Template keys fix.

This commit is contained in:
flash 2024-06-10 03:34:51 +00:00
parent f3382488fe
commit 55f2d5cc14

View file

@ -23,8 +23,8 @@ module.exports = function(env) {
process: async (task, vars) => {
let data = fs.readFileSync(pathJoin(env.source, task.source));
if(typeof task.vars === 'string' && task.vars in vars)
data = strtr(data, vars[task.vars]);
if(typeof task.template === 'string' && task.template in vars)
data = strtr(data, vars[task.template]);
if(!env.debug)
data = await htmlminify(data, MINIFY_OPTS);