Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f5c7b0ca0 | |||
| 7de38ce050 |
10
dist/index.js
vendored
10
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,13 +1,14 @@
|
||||
{
|
||||
"name": "npmci",
|
||||
"version": "2.1.60",
|
||||
"version": "2.1.61",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
"npmci": "dist/index.js"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "(npmts)"
|
||||
"test": "(npmts) && (npm run testVersion)",
|
||||
"testVersion": "node dist/index.js -v"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -22,8 +22,8 @@ export {publish} from "./npmci.publish";
|
||||
let command;
|
||||
let commandOption:string;
|
||||
|
||||
plugins.commander
|
||||
.version(npmciInfo.version)
|
||||
let commander = plugins.commander
|
||||
.option("-v","--version","print version")
|
||||
.arguments('<commandarg> [commandoptionarg]')
|
||||
.action(function (commandarg, commandoptionarg) {
|
||||
command = commandarg;
|
||||
@@ -32,6 +32,11 @@ plugins.commander
|
||||
|
||||
plugins.commander.parse(process.argv);
|
||||
|
||||
if(commander.version) {
|
||||
console.log(npmciInfo.version);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
if (typeof command === 'undefined') {
|
||||
console.error('no command given!');
|
||||
process.exit(1);
|
||||
|
||||
Reference in New Issue
Block a user