Added file list generation.
This commit is contained in:
parent
8d1650260c
commit
72230e07b0
2 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@flashwave/assproc",
|
"name": "@flashwave/assproc",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"description": "Personal frontend asset processing tool",
|
"description": "Personal frontend asset processing tool",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -51,6 +51,8 @@ const public = {
|
||||||
if(typeof vars !== 'object' || vars === null)
|
if(typeof vars !== 'object' || vars === null)
|
||||||
throw 'env.vars must be a non-null object';
|
throw 'env.vars must be a non-null object';
|
||||||
|
|
||||||
|
const files = {};
|
||||||
|
|
||||||
for(const type of order) {
|
for(const type of order) {
|
||||||
if(!(type in types))
|
if(!(type in types))
|
||||||
throw `${type} is not a supported build task type`;
|
throw `${type} is not a supported build task type`;
|
||||||
|
@ -69,6 +71,8 @@ const public = {
|
||||||
|
|
||||||
if(typeof task.varsName === 'string')
|
if(typeof task.varsName === 'string')
|
||||||
vars[task.varsGroup ?? ''][task.varsName] = path;
|
vars[task.varsGroup ?? ''][task.varsName] = path;
|
||||||
|
|
||||||
|
files[task.source] = path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,6 +88,8 @@ const public = {
|
||||||
housekeep(path);
|
housekeep(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return files;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue