Home > Article > Backend Development > Summary of npm common commands
This article brings you a summary of commonly used npm instructions. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Something about npm
.Command line window
- 常用的指令: dir 列出当前目录下的所有文件 cd 目录名 进入到指定的目录 md 目录名 创建一个文件夹 rd 目录名 删除一个文件夹 - 目录 . 表示当前目录 .. 表示上一级目录
npm command
npm -v Function: View the version of npm
npm version Function: View the version of all modules
npm search/s Package name Function: Search Package
npm install / i package name Function: install package
npm remove / r package name Function: delete package
npm install package name --save Function: Install the package and add it to dependencies*
npm install Function: Download the current project Dependent packages
npm install package name -g Function: Global installation package (global installation packages are generally some tools)
// npm init 初始化项目(创建package.json) npm i/install 包名 安装指定的包 npm i/install 包名 --save 安装指定的包并添加依赖 npm i/install 包名 -g 全局安装(一般都是一些工具)
The above is the detailed content of Summary of npm common commands. For more information, please follow other related articles on the PHP Chinese website!