-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from sintaxi/ko-commander-fix
Fixes Commander terminal, input, and output options
- Loading branch information
Showing
7 changed files
with
69 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#! /usr/bin/env node | ||
|
||
var argv = require('minimist')(process.argv.slice(2)) | ||
var surge = require('../../../')({ | ||
name: 'minimist' | ||
}) | ||
|
||
var hooks = {} | ||
|
||
if (argv._[0] === 'login') { | ||
return surge.login(hooks)(argv._.slice(1)) | ||
} | ||
|
||
if (argv._[0] === 'whoami') { | ||
return surge.whoami(hooks)(argv._.slice(1)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#! /usr/bin/env node | ||
|
||
var program = require('yargs') | ||
var surge = require('../../../')({ | ||
name: 'yargs' | ||
}) | ||
|
||
var hooks = {} | ||
|
||
program | ||
.command('login', 'Login to your account', surge.login(hooks)) | ||
.usage('$0 <command>') | ||
.argv | ||
|
||
program | ||
.command('whoami', 'Check who you are logged in as.', surge.whoami(hooks)) | ||
.usage('$0 <command>') | ||
.argv |