Reputation: 5821
What does the -S
flag for npm mean? I see it referenced here but https://docs.npmjs.com/cli/install does not cover what the -S
is.
npm i -S @types/google-apps-script
Upvotes: 44
Views: 20848
Reputation: 6595
-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
). However, --save
or -S
is totally unnecessary if you're using npm 5 or above since it's done by default.
Upvotes: 65
Reputation:
The 'S' option is the Save option in npm. It adds the npm package to your dependencies for your project. It's the same as --save
.
Upvotes: 26