1. npm 包管理
// 1.1 全局
npm install -g 包名字 安装全局包
npm uninstall -g 包名字 卸载全局包
// 1.2 局部
npm init -y
npm install 包名字 -S/–save 安装包到开发依赖
npm uninstall 包名字 -S/–save 卸载开发依赖包
npm install 包名字 -D/–save-dev 安装包到测试环境中
npm uninstall 包名字 -D/–save-dev 卸载测试环境中包
npm install 包名字@版本号 下载指定版本的包
// 1.3 解决npm下载网速过慢问题
1.3.1 百度 淘宝镜像 然后使用cnpm 代替npm 执行对应包下载
1.3.2 还用yarn下载
npm/cnpm install yarn -g 安装全局yarn
yarn init 初始化package.json文件
yarn add 包名字 通过yarn下载包
yarn remove 包名字 通过yarn卸载包
让他去package.json去下载对应的包
// yarn install 或者yarn
// npm install 获取npm i