Skip to content

Commit d237cdc

Browse files
committed
Add --help
1 parent d160968 commit d237cdc

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ npm install edit-script
1111
## Usage
1212

1313
```
14-
edit-script <script-name>
14+
$ edit-script --help
15+
Edit npm scripts from the command line without worrying about json escaping.
16+
17+
edit-script <script>
1518
```
1619

1720
## License

cli.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ var findPkg = require('pkg-up');
66

77
var script = process.argv[2];
88

9+
// help message:
10+
if (script === '--help') {
11+
console.log(
12+
`Edit npm scripts from the command line without worrying about json escaping.
13+
14+
edit-script <script>`
15+
);
16+
process.exit();
17+
}
18+
919
var pkgPath;
1020
var pkg = {}
1121
var scripts = {};

0 commit comments

Comments
 (0)