I'm seeing this command on some packages and I wonder what the -s
argument means, for example
npm i -S classnames flexboxgrid
I mean, I know that, just like i
is an abbreviation of install
, it is an abbreviation of something, however I tried looking at npm help
, npm help help
, npm apihelp npm
, npm help npm
, nothing practically helpful there. This is like giving a dictionary to an illiterate; many words, but nothing about option arguments or their abbreviations.
-S is shorthand for --save , and it adds the package you're installing to the dependencies in your package. json file (which can be created with npm init ).
run-s command. A CLI command to run given npm-scripts sequentially.
deduped is short for "deduplicated" (duplicates were removed). The documentation for npm dedupe explains how npm does this: Searches the local package tree and attempts to simplify the overall structure by moving dependencies further up the tree, where they can be more effectively shared by multiple dependent packages.
npm uses the tilde (~) and caret (^) to designate which patch and minor versions to use respectively. So if you see ~1.0. 2 it means to install version 1.0.
The 'S' option is the Save option in npm. It adds the npm package to your dependencies for your project. You can also add the dependency manually by editing the package.json file.
To answer your question about getting help for npm, use the following command:
npm help i
That will give you a description of all the options available for the 'i' option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With