NPM and Bower
1 NPM is a package manager that accompanies node. js, which initially supports only node. JS module Management, now supports JavaScript Package Manager, front-end Universal
2 Bower is a package manager designed for front-end performance, all for the front-end consideration
Difference:
NPM: Supports nested dependency management, resulting in a folder called "Node_modules"
Bower: Only support flat dependencies, nested dependencies, solved by the program itself
Usage in development:
Bower Management front-end packages
NPM manages back-end packages and build tools such as Yeoman,grunt,gulp,jshint, etc.
But now almost all use NPM to download Management Pack files and back-end module management, not with Bower
NPM-Generated Package.json
Package.json is a dependency package that manages NPM
After executing NPM init, the files that appear
The setup step for NPM is to go to the next node. js file and go to Npm-v
NPM Download Plugin, more multifunctional Baidu go
1 NPM init//build Package.json file
2 npm Install jquery--save--dev//Build devdependencies dependencies in Pckage.json
3 npm Install jquery--save//Build dependencies dependencies in Package.json, so when uploading git, you don't have to upload "node_modules" files.
4 NPM Install jquery//Do not write, default ibid.
5 NPM Install or NPM install--save-dev//upload git or company repository, you can delete NPM's "Node_modules" folder, clone the code, then execute the command, according to the configuration in Package.json Depends on the download plugin
The difference between NPM and Bower