add src/dst bundle inputs, prod bundle config

This commit is contained in:
Stewart Allen 2025-11-12 00:46:25 -05:00
commit f78e392e71
4 changed files with 52 additions and 6 deletions

11
app.js
View file

@ -204,6 +204,17 @@ function init(mod) {
fs.mkdirSync(`alt/main`, { recursive: true });
let body = fs.readFileSync(src);
fs.writeFileSync(`alt/main/${key}.js`, body + val);
if (true) {
// packed
src= `src/pack/${key}-main.js`;
if (!fs.existsSync(src)) {
logger.log('missing:', src);
continue;
}
fs.mkdirSync(`alt/pack`, { recursive: true });
body = fs.readFileSync(src);
fs.writeFileSync(`alt/pack/${key}-main.js`, body + val);
}
}
}
};