Answers for "npm run script with arguments"

2

npm script with arguments

"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`
Posted by: Guest on March-31-2021
0

npm run command with arguments

npm run <command> [-- <args>]
ex: npm start -- --reset-cache
Posted by: Guest on May-01-2021
-2

npm run script with arguments

$ PORT=8080 npm start
Posted by: Guest on February-23-2021
-2

npm run script with arguments

"start": "node ./script.js server $PORT"
Posted by: Guest on February-23-2021

Code answers related to "npm run script with arguments"

Browse Popular Code Answers by Language