diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index c655cdca96..c18922485b 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -330,7 +330,7 @@ $(document).ready(function () { }; ajaxify.loadTemplate = function (template, callback) { - require([config.relative_path + '/assets/templates/' + template + '.jst'], callback, function (err) { + require([config.relative_path + '/assets/templates/' + template + '.js'], callback, function (err) { console.error('Unable to load template: ' + template); throw err; }); diff --git a/src/admin/search.js b/src/admin/search.js index dfc9034658..1803f3298c 100644 --- a/src/admin/search.js +++ b/src/admin/search.js @@ -14,11 +14,11 @@ function filterDirectories(directories) { // get the relative path return dir.replace(/^.*(admin.*?).tpl$/, '$1'); }).filter(function (dir) { - // exclude .jst files + // exclude .js files // exclude partials // only include subpaths // exclude category.tpl, group.tpl, category-analytics.tpl - return !dir.endsWith('.jst') && + return !dir.endsWith('.js') && !dir.includes('/partials/') && /\/.*\//.test(dir) && !/manage\/(category|group|category-analytics)$/.test(dir); diff --git a/src/controllers/admin/settings.js b/src/controllers/admin/settings.js index 0410d4ea9e..28322892f3 100644 --- a/src/controllers/admin/settings.js +++ b/src/controllers/admin/settings.js @@ -35,9 +35,9 @@ function renderEmail(req, res, next) { file.walk(emailsPath, next); }, function (emails, next) { - // exclude .jst files + // exclude .js files emails = emails.filter(function (email) { - return !email.endsWith('.jst'); + return !email.endsWith('.js'); }); async.map(emails, function (email, next) { diff --git a/src/meta/templates.js b/src/meta/templates.js index 18991fc149..4f9f59d861 100644 --- a/src/meta/templates.js +++ b/src/meta/templates.js @@ -76,7 +76,7 @@ Templates.compile = function (callback) { }, next); }, function (next) { - rimraf(path.join(viewsPath, '*.jst'), next); + rimraf(path.join(viewsPath, '*.js'), next); }, function (next) { winston.verbose('[meta/templates] Successfully compiled templates.'); diff --git a/src/middleware/index.js b/src/middleware/index.js index 511ae1ddd4..507878dc0c 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -192,7 +192,7 @@ middleware.delayLoading = function (req, res, next) { var viewsDir = nconf.get('views_dir'); middleware.templatesOnDemand = function (req, res, next) { var filePath = req.filePath || path.join(viewsDir, req.path); - if (!filePath.endsWith('.jst')) { + if (!filePath.endsWith('.js')) { return next(); } @@ -205,7 +205,7 @@ middleware.templatesOnDemand = function (req, res, next) { return next(); } - fs.readFile(filePath.replace(/\.jst$/, '.tpl'), cb); + fs.readFile(filePath.replace(/\.js$/, '.tpl'), cb); }, function (source, cb) { Benchpress.precompile({ diff --git a/src/views/500-embed.tpl b/src/views/500-embed.tpl index b1045d431f..f5258cb8db 100644 --- a/src/views/500-embed.tpl +++ b/src/views/500-embed.tpl @@ -1,5 +1,5 @@