Skip to content

Commit

Permalink
use commander for parsing options
Browse files Browse the repository at this point in the history
  • Loading branch information
suryagaddipati committed Nov 20, 2015
1 parent 2c882fc commit 86b20a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/jsx/terminal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
8 changes: 6 additions & 2 deletions src/main/jsx/terminal/src/cli.js
Original file line number Diff line number Diff line change
@@ -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>', 'Server Url(eg: http://www.myci.com)')
.option('-r, --repo <repo>', 'Repo eg: surya/mycoolapp, defaults to current git repo if not passed in')
.parse(process.argv);
terminal(program.server,program.repo);

0 comments on commit 86b20a7

Please sign in to comment.