Use .js instead of .jst

Fix #5934
This commit is contained in:
Peter Jaszkowiak
2017-09-23 12:51:20 -06:00
parent f989988178
commit dc87d7fc0f
8 changed files with 12 additions and 12 deletions

View File

@@ -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({