Files
NativeScript/packages/webpack/bin/update-ns-webpack

21 lines
452 B
JavaScript
Executable File

#!/usr/bin/env node
const update = require("../verify/update");
const { original: npmArgs = [] } = JSON.parse(process.env.npm_config_argv || "{}");
const [, , ...processArgs ] = process.argv;
const flags = [ ...npmArgs, ...processArgs ]
.filter(f => f.startsWith("--"))
.map(f => f.substring(2));
function addOption(all, current) {
all[current] = true;
return all;
}
const options = flags.reduce(addOption, {});
update(options);