Added file list generation.

This commit is contained in:
flash 2024-06-09 20:00:58 +00:00
parent 8d1650260c
commit 72230e07b0
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@flashwave/assproc",
"version": "0.1.0",
"version": "0.2.0",
"description": "Personal frontend asset processing tool",
"main": "index.js",
"scripts": {

View file

@ -51,6 +51,8 @@ const public = {
if(typeof vars !== 'object' || vars === null)
throw 'env.vars must be a non-null object';
const files = {};
for(const type of order) {
if(!(type in types))
throw `${type} is not a supported build task type`;
@ -69,6 +71,8 @@ const public = {
if(typeof task.varsName === 'string')
vars[task.varsGroup ?? ''][task.varsName] = path;
files[task.source] = path;
}
}
@ -84,6 +88,8 @@ const public = {
housekeep(path);
}
}
return files;
},
};