Altered vars handling.
This commit is contained in:
parent
36414468dc
commit
99b8f4919b
1 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue