generate rollup and webpack templates from a single unified branch

This commit is contained in:
Conduitry
2019-01-20 12:14:58 -05:00
parent 1234971da5
commit 3f6a1c5f67
10 changed files with 203 additions and 42 deletions

13
_template/build-pkg.js Normal file
View File

@@ -0,0 +1,13 @@
const fs = require('fs');
const type = process.argv[2];
const pkg = require('../package_template.json');
for (const key in pkg['merge-configs'][type]) {
Object.assign(pkg[key], pkg['merge-configs'][type][key]);
}
delete pkg['merge-configs'];
fs.writeFileSync(
__dirname + '/../package.json',
JSON.stringify(pkg, null, ' ') + '\n'
);