NPM install Some parameters are used to install NPM packages. What are their functions?

  1. Parameter one: –save, shortened to -s, indicates that the dependencies of the current installation are run dependencies (production), meaning packages that are also indispensable after being released to production. With this parameter, the dependency description is added to the Dependencies property under package.json.

  2. Parameter 2: -save-dev, short for -d, indicates that the currently installed dependency is a develop-aid dependency package, which is only needed in the development environment. For example, gulp-uglify is a package used to compress the size of js files. With the command above, this dependency is added to the devDependencies property under package.json.

  3. Parameter 3: -y, usually used in NPM init -y. The default package.json file is generated by init without the need to hit return multiple times.