Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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`
Comment

npm script with arguments

"start": "node ./script.js server $PORT"
And then from the command-line:

$ PORT=8080 npm start
Comment

PREVIOUS NEXT
Code Example
Shell :: linux add icon to .desktop file 
Shell :: merge two branches in git command 
Shell :: window reset wifi cmd 
Shell :: redux 
Shell :: Bash test if variable is a number 
Shell :: where can i sell my laptop 
Shell :: bash substitution 
Shell :: how to compress files in powershell 
Shell :: extract rar centos 
Shell :: powershell import-certificate trusted publisher 
Shell :: find the index of a substring 
Shell :: git rename other branch 
Shell :: rescale kubectl 
Shell :: $() vs () bash 
Shell :: append data to a file with cat command 
Shell :: jenkins download 
Shell :: How to use alias in Linux bash 
Shell :: install moment.js 
Shell :: sed mac install 
Shell :: linux apps 
Shell :: github swaggo 
Shell :: laravel github 
Shell :: docker input device is not a tty 
Shell :: git clone without project folder 
Shell :: command to check the amount of disk space used 
Shell :: droidcam usb 
Shell :: curl with regex 
Shell :: git not recognized 
Shell :: datadog 
Shell :: packet tracer 2.7.1 Full Config P2P-3 Router 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =