add src/dst bundle inputs, prod bundle config
This commit is contained in:
parent
783f39bb4e
commit
f78e392e71
4 changed files with 52 additions and 6 deletions
11
app.js
11
app.js
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue