Hello @kartik,
The syntax is as follows:
npm run <command> [-- <args>]
Note the necessary --. It is needed to separate the params passed to npm command itself and params passed to your script.
So if you have in package.json
"scripts": {
"grunt": "grunt",
"server": "node server.js"
}
Then the following commands would be equivalent:
grunt task:target => npm run grunt -- task:target
node server.js --port=1337 => npm run server -- --port=1337
Hope it helps!!
Thank You!