client/general: change templates extension
...from .Handlebars' (which the project no longer uses) .hbs, to a more generic .tpl. Additionally, replace hyphens with underscores for consistency.
This commit is contained in:
parent
407848706a
commit
50404d5f5e
|
@ -63,10 +63,10 @@ function bundleHtml(config) {
|
||||||
collapseWhitespace: true,
|
collapseWhitespace: true,
|
||||||
conservativeCollapse: true,
|
conservativeCollapse: true,
|
||||||
};
|
};
|
||||||
glob('./html/**/*.hbs', {}, (er, files) => {
|
glob('./html/**/*.tpl', {}, (er, files) => {
|
||||||
let templates = {};
|
let templates = {};
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
const name = path.basename(file, '.hbs').replace(/_/g, '-');
|
const name = path.basename(file, '.tpl').replace(/_/g, '-');
|
||||||
templates[name] = minify(
|
templates[name] = minify(
|
||||||
fs.readFileSync(file, 'utf-8'), minifyOptions);
|
fs.readFileSync(file, 'utf-8'), minifyOptions);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue