Skip to content

Commit

Permalink
Merge pull request #43 from royriojas/alias
Browse files Browse the repository at this point in the history
fix #42. Add shorter cli alias
  • Loading branch information
benoror authored Jun 22, 2016
2 parents d4c8cf1 + d0aaec1 commit 9532591
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ PORT=5000

# Shell scripts

Currently, using [bash variables](http://tldp.org/LDP/abs/html/internalvariables.html) (PWD, USER, etc.) is not possible:
Currently, using [bash variables](http://tldp.org/LDP/abs/html/internalvariables.html) (PWD, USER, etc.) is not possible:

``` JSON
"command": "forever start -l ${PWD}/logs/forever.log -o ${PWD}/logs/out.log -e ${PWD}/logs/errors.log -a index.js",
Expand All @@ -97,3 +97,29 @@ forever start -l ${PWD}/logs/forever.log -o ${PWD}/logs/out.log -e ${PWD}/logs/e
``` javascript
"command": "./forever.sh"
```

## cli commands

This module expose 2 cli commands:
- `better-npm-run` and,
- a shorter one: `bnr` which is an alias to the former.

The shorter one is useful for cases where you have a script that calls several `better-npm-run` scripts. e.g:

using the normal cli name

```javascript
"scripts": {
"dev": "shell-exec 'better-npm-run install-hooks' 'better-npm-run watch-client' 'better-npm-run start-dev' 'better-npm-run start-dev-api' 'better-npm-run start-dev-worker' 'better-npm-run start-dev-socket'",
}
```

using the shorter alias

```javascript
"scripts": {
"dev": "shell-exec 'bnr install-hooks' 'bnr watch-client' 'bnr start-dev' 'bnr start-dev-api' 'bnr start-dev-worker' 'bnr start-dev-socket'",
}
```


1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"main": "index.js",
"bin": {
"bnr": "index.js",
"better-npm-run": "index.js"
},
"scripts": {
Expand Down

0 comments on commit 9532591

Please sign in to comment.