Difference between - and -- (single and double dash) in npm commands

Viewed 4062

Am wondering if this question is already addressed or not.

I have used few commands like this :

npm install -g

npm install -d

Then i have used few like :

npm install XYZ --save-dev

npm install --only=dev

Whats the fundamental difference between - and -- ?

Has it got to do anything with primary and secondary arguments ?

3 Answers

Generally, - is an abbreviation, there must be a corresponding -— full name.

For example:

npm install -D is equal to npm install --save-dev

npm install arguments examples

Related