What is the “-d” in “npm -d install”?

2020-02-17 04:30发布

问题:

I've seen some posts that refer to running npm with a -d argument. For example, this issue refers to doing npm -d install coffee-script. There are a few other pages that also refer to this syntax, including the install instructions for at least one npm package.

But I've been unable to find any documentation for this -d argument. The docs for npm install make no mention of -d, nor does the npm FAQ, nor do any of the other documentation pages I've looked through.

Does the -d option do anything? If so, what?

回答1:

In case anyone else ends up here from a web search, the -d flag is not the same as the upper-case -D, the latter being a flag synonym for --save-dev.



标签: npm