mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
@@ -0,0 +1,24 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
console.log('Updating package file'); // eslint-disable-line no-console
|
||||||
|
|
||||||
|
if (process.argv.length !== 3) {
|
||||||
|
console.error('No enough args'); // eslint-disable-line no-console
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const pkgFilepath = process.argv[process.argv.length - 1];
|
||||||
|
const pkg = require(pkgFilepath);
|
||||||
|
|
||||||
|
// Ensure we have the keys we need
|
||||||
|
|
||||||
|
pkg.files = ['**/*'];
|
||||||
|
pkg.rancher = true;
|
||||||
|
pkg.main = `${ pkg.name }-${ pkg.version }.umd.min.js`;
|
||||||
|
|
||||||
|
delete pkg.scripts;
|
||||||
|
delete pkg.browserslist;
|
||||||
|
|
||||||
|
|
||||||
|
fs.writeFileSync(pkgFilepath, JSON.stringify(pkg, null, 2));
|
||||||
Reference in New Issue
Block a user