一、相關命令
1.升級npm 包管理工具
npm i -g npm
2.產生一個package.json
npm init
3.列出已安裝依賴
npm list -g
npm list 顯示已經安裝過的包
4.安裝
npm install xxx -gd (global detail)
npm install xxx --save -dev
5. 卸載
npm unstall xxx -gd
npm unstall xxx
6.升級
npm update xxx -gd
npm update xxx
7. 查詢及查看包的所有版本
npm search xxx
npm view xxx versions
npm root 查看依賴安裝路徑
npm root -g
淘寶鏡像cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install xxx
yarn 包管理工具
https://yarnpkg.com/en/docs/install
https://yarn.bootcss.com/docs/getting-started.html
二、常見工具包