From 72230e07b020699bec70dcad6d9d3a6202714b27 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 9 Jun 2024 20:00:58 +0000 Subject: [PATCH] Added file list generation. --- package.json | 2 +- src/index.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 071b106..9f61b16 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/index.js b/src/index.js index 778ad96..88f11f4 100644 --- a/src/index.js +++ b/src/index.js @@ -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; }, };