commander-rxjs
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "commander-rxjs", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "A simple adapter to easily use RxJS with commander.", | ||
@@ -17,3 +17,3 @@ "main": "dist/index.js", | ||
"prebuild": "rimraf dist", | ||
"build": "babel src -d dist --ignore spec.js", | ||
"build": "babel src -d dist --ignore test.js", | ||
"coverage": "jest --coverage", | ||
@@ -24,3 +24,3 @@ "postcoverage": "opn coverage/lcov-report/index.html", | ||
"prepublish": "npm run build", | ||
"test": "jest" | ||
"test": "jest --verbose" | ||
}, | ||
@@ -27,0 +27,0 @@ "dependencies": { |
@@ -31,10 +31,11 @@ # commander-rxjs | ||
program | ||
.command('order [item]') // commander function | ||
.option('--two-day-shipping') // commander function | ||
.observe() // convert to observable stream | ||
.do(command => { // RxJS function | ||
console.log(command.args); // --> { item: "JavaScript Stickers" } | ||
console.log(command.options); // --> { twoDayShipping: true } | ||
.command('order [item]') | ||
.option('--two-day-shipping') | ||
.observe() | ||
.do(command => { | ||
console.log(command.args, command.options); | ||
// --> { item: "JavaScript Stickers" } | ||
// --> { twoDayShipping: true } | ||
}) | ||
.subscribe(); // RxJS function | ||
.subscribe(); | ||
@@ -45,1 +46,7 @@ // INPUT: amazon-cli order "JavaScript Stickers" --two-day-shipping | ||
``` | ||
## Examples | ||
Be sure to checkout all of the [examples](https://github.com/nickbreaton/commander-rxjs/tree/master/examples). | ||
Then can easily be run by `npm run example:[example-name]`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9172
51
0