NPM common commands

mounting module basic commands npm

npm install moduleName # install module to the project directory

moduleName the install NPM -g # - G means is mounted to the global module

moduleName install npm -save # - the Save meaning is to install the module into the project directory, and writes relies on dependencies node package.json file.

moduleName the install NPM --save-dev # - Save the mean-dev module to the project directory, and writes the node dependent on devDependencies package.json file.

among them:

  • -g, -save, -save-dev written just before the moduleName
  • moduleName may be multiple, separated by spaces
  • -save can be abbreviated as -S
  • -save-dev can be abbreviated as -D
  • It can be abbreviated as i install

Install the specified version webpack

above sea level and WebPack @ 3.6 . 0 g  

 webpack and webpack-dev-server version of the corresponding problem

WebPACK . 3 .x dev-To-Server WebPACK 2 .x

WebPACK . 4 .x dev-To-Server WebPACK . 3 .x

 

 

Guess you like

Origin www.cnblogs.com/aizai846/p/11837227.html