0

According to the website https://docs.npmjs.com/cli/run-script

npm run-script <command> [-- <args>...] 

Where can I find a list of these arguments?

2
  • Have you tried npm -h or npm --help? Commented Nov 25, 2015 at 23:53
  • @nathanhleung Yes doesn't give me detailed docs unfortunately :( Commented Nov 25, 2015 at 23:54

1 Answer 1

1

It just means that everything after the -- is passed directly to the invoked script. There is no fixed list of arguments, you define them yourself.

Example :

// Package.json :
"myscript": "node ./myfile.js"

// myfile.js :
console.log(process.argv[2]); 

// Command :    
npm run-script myscript -- foobar // prints 'foobar'
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.