better cli arg supper
This commit is contained in:
@@ -11,6 +11,8 @@ const readmefile_1 = require("./readmefile");
|
||||
const build_1 = __importDefault(require("./build"));
|
||||
const CLIArgs = (0, command_line_args_1.default)([
|
||||
{ name: 'watch', alias: 'w', type: Boolean },
|
||||
{ name: 'minify', alias: 'm', type: Boolean },
|
||||
{ name: 'prettier', alias: 'p', type: Boolean },
|
||||
]);
|
||||
//if package.json doesn't exist then there is no point in continuing
|
||||
if (!(0, fs_1.existsSync)('package.json') || !(0, fs_1.lstatSync)('package.json').isFile()) {
|
||||
@@ -36,7 +38,7 @@ for (let name of scripts) {
|
||||
console.log('WATCH', name, meta.version);
|
||||
(0, readmefile_1.updateReadmeFile)(scriptMeta);
|
||||
}
|
||||
let [meta, error] = (0, build_1.default)(name, CLIArgs.watch ? postWatchUpdate : false, PrettierConfig);
|
||||
let [meta, error] = (0, build_1.default)(name, postWatchUpdate, PrettierConfig, CLIArgs);
|
||||
scriptMeta[id] = { meta, error };
|
||||
console.log(name, meta.version);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user