mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-15 19:44:48 +00:00
generate rollup and webpack templates from a single unified branch
This commit is contained in:
13
_template/build-pkg.js
Normal file
13
_template/build-pkg.js
Normal 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'
|
||||
);
|
||||
Reference in New Issue
Block a user