mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
21 lines
452 B
JavaScript
Executable File
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);
|
|
|