从npm升级到yarn
安装yarn
1 | npm install -g yarn |
更改国内cnpm源
1 | yarn config set registry 'https://registry.npm.taobao.org' |
npm与yarn相关命令
- 项目初始化
1 | npm init |
- 安装依赖
1 | npm install |
- 安装某个依赖
1 | npm install xxx --save |
- 安装某个开发依赖
1 | npm install xxx --save-dev |
- 移除某个依赖
1 | npm uninstall xxx --save |
- 更新某个依赖
1 | npm update --save xxx |
- 安装全局依赖
1 | npm install -g xxx |
- 运行某个命令
1 | npm run xxx |
- 发布/登录/登出,一系列NPM Registry操作
1 | npm publish/login/logout |
请针对 Disqus 开启代理