Home >Web Front-end >JS Tutorial >How to use npm to install and delete modules

How to use npm to install and delete modules

php中世界最好的语言
php中世界最好的语言Original
2018-05-29 17:28:311556browse

This time I will show you how to use npminstalldelete modules, what are the precautions for using npm to install and delete modules, the following is a practical case, Let’s take a look.

npm installation module

[npm install xxx] Use npm to install the xxx module to the directory where the current command line is located;

[npm install -g xxx] Use npm to install the global module xxx;

When installing locally, write the module into package.json:

【npm install xxx】Install but do not write to package.json;

【npm install xxx –save】Install and write to package.json’s “depend encies";

[npm install xxx –save-dev] Install and write it into "devDependencies" of package.json.

npm delete module

[npm uninstall xxx]Delete xxx module;

[npm uninstall -g xxx]Delete Global module xxx;

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the PHP Chinese website!

Recommended reading:

How to use vue addRoutes to implement dynamic permission routing menu

How to use the http server in angularjs

The above is the detailed content of How to use npm to install and delete modules. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn