diff --git a/src/main/jsx/terminal/package.json b/src/main/jsx/terminal/package.json index fe0f0f73..58259092 100644 --- a/src/main/jsx/terminal/package.json +++ b/src/main/jsx/terminal/package.json @@ -29,7 +29,7 @@ "blessed": "^0.1.81", "blessed-contrib": "^2.5.1", "colors": "^1.1.2", - "minimist": "^1.2.0", + "commander": "^2.9.0", "request": "^2.65.0", "simple-git": "^1.11.0" }, diff --git a/src/main/jsx/terminal/src/cli.js b/src/main/jsx/terminal/src/cli.js index 5b4b6fbb..1b4b189a 100644 --- a/src/main/jsx/terminal/src/cli.js +++ b/src/main/jsx/terminal/src/cli.js @@ -1,5 +1,9 @@ #!/usr/bin/env node //--server http://localhost:8080/jenkins --repo suryagaddipati/DotCi import terminal from './index.js'; -let {server,repo} = require('minimist')(process.argv.slice(2)); -terminal(server,repo); +var program = require('commander'); +program +.option('-s, --server ', 'Server Url(eg: http://www.myci.com)') +.option('-r, --repo ', 'Repo eg: surya/mycoolapp, defaults to current git repo if not passed in') +.parse(process.argv); +terminal(program.server,program.repo);