node1-altitude

asl

Package Manager, for node package installed, uninstalled.

The original JS What's the difference:

Need to download the appropriate JS JS files using other features, it introduced its own file with the Script tag. But also consider the introduction of the order of nesting rely on other JS files, more complicated.

npm use,

1.npm init initialization packet, generates a package.json, for maintaining information for a package, including dependency, basic information, test, run commands, keywords and the like. There is a script object in the package.json, this object record within a command to run the key value value. Such as our common npm run build / dev, build and dev is actually defined within the script the object key, the command is actually running behind the value recorded. package.json as follows:

 

 

npm run test, is actually run echo \ "Error: no test specified \" && exit 1 sentence command.

2.npm install package name, package installation, maintenance package.json dependent group.

3.npm uninstall package name, removing the package dependency information, delete package.json dependent group.

Global -g during installation

After the installation is a global package on the whole computer can be used; otherwise, only the folder can use this package.

cnpm

Server in the country, faster than when npm install package.

 

Guess you like

Origin www.cnblogs.com/hzozj/p/11794481.html