diff --git a/src/index.js b/src/index.js index b245c2d..74c1698 100644 --- a/src/index.js +++ b/src/index.js @@ -33,9 +33,6 @@ module.exports.process = async (env, tasks) => { const files = {}; for(const type of order) { - if(!types.hasOwnProperty(type)) - continue; - if(!(type in types)) throw `${type} is not a supported build task type`; @@ -54,8 +51,9 @@ module.exports.process = async (env, tasks) => { console.info(` => ${task.source}...`); const path = await handler.process(task, vars); - if(typeof task.varsName === 'string') - vars[task.varsGroup ?? ''][task.varsName] = path; + if(typeof task.vars === 'object' && task.vars !== null) + for(const varsGroup in task.vars) + vars[varsGroup][task.vars[varsGroup] === ':source' ? task.source : task.vars[varsGroup]] = path; files[task.source] = path; }