Skip to content

Commit

Permalink
Bump 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
59naga committed Jun 18, 2015
1 parent d5a0667 commit ba7efc5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -2,23 +2,22 @@

> Receive file/uri and stdin at [commander.js](https://github.com/tj/commander.js)
## Installation
```bash
$ npm install commander-file
```

* Fetch data after [parse](https://github.com/tj/commander.js#option-parsing) via first argument or `--stdin`.
* First argument always return the file.

# Usage
```bash
$ npm install commander-file --save
```

program.js
./program.js

```js
#!/usr/bin/env node

var program = require('commander-file');
program
.version('0.0.0')
.usage('<file/url> dostaff [options...]')
.parse(process.argv).then(function(data){
console.log(data);
Expand All @@ -34,8 +33,9 @@ $ node program.js --help
#
# Options:
#
# -h, --help output usage information
# -S, --stdin use the stdin.
# -h, --help output usage information
# -S, --stdin use the stdin
# -V, --version output the version number

# stdin
$ echo -n 'foo' | node program.js --stdin dostaff
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,11 +1,11 @@
{
"name": "commander-file",
"version": "0.0.2-alpha",
"version": "0.0.2",
"description": "Receive file/uri and stdin at commander",

"scripts": {
"start": "jasminetea --watch",
"test": "jasminetea --cover --report --lint",
"test": "jasminetea --cover --report --lint --timeout 2000",

"prepublish": "node -e \"if(process.env.TRAVIS){}else{process.exit(1)}\" && npm run compile || echo skip prepublish",
"compile": "coffee --bare --compile index.coffee",
Expand Down
2 changes: 1 addition & 1 deletion src/index.coffee
Expand Up @@ -21,7 +21,7 @@ class CommandFile extends Command
@config.uriTimeout?= 0

if @config.stdin
@option '-S, --stdin','use the stdin.'
@option '-S, --stdin','use the stdin'

parse: ->
super
Expand Down

0 comments on commit ba7efc5

Please sign in to comment.