xxxxxxxxxx
"scripts": {
"grunt": "grunt",
"server": "node server.js"
}
# here's how to pass the params to those scripts:
npm run grunt -- task:target // invokes `grunt task:target`
npm run server -- --port=1337 // invokes `node server.js --port=1337`
xxxxxxxxxx
"start": "node ./script.js server $PORT"
And then from the command-line:
$ PORT=8080 npm start
xxxxxxxxxx
package.json
```
"scripts": {
...
"myscript": "acommand"
}
```
$ npm run myscript -- myargument # runs "acommand myargument"