Skip to content

Commit

Permalink
Add --help
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanZim committed Nov 1, 2016
1 parent d160968 commit d237cdc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ npm install edit-script
## Usage

```
edit-script <script-name>
$ edit-script --help
Edit npm scripts from the command line without worrying about json escaping.
edit-script <script>
```

## License
Expand Down
10 changes: 10 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ var findPkg = require('pkg-up');

var script = process.argv[2];

// help message:
if (script === '--help') {
console.log(
`Edit npm scripts from the command line without worrying about json escaping.
edit-script <script>`
);
process.exit();
}

var pkgPath;
var pkg = {}
var scripts = {};
Expand Down

0 comments on commit d237cdc

Please sign in to comment.