A simple npm
helper for the command-line to manage npm-scripts.
It's for the lazy programmer because editing json files is terrible.
npm install -g npm-scripter
If you like, create a bash alias
alias nps='npm-scripter'
Get help & examples with
nps -h
List all npm-scripts with (basically the same as npm run
)
nps
List npm-script foo
with
nps foo
Create a new npm-script with
nps foo 'echo "bar"'
This creates an entry in package.json
like this:
"scripts": {
"foo": "echo \"bar\""
}
Edit an existing npm-script (only the commands part) in $EDITOR
with
nps foo -e
Delete npm-script foo
with
nps foo -d
Delete all npm-scripts with
nps -d