npm、yarn常用命令记录,后续会陆续补充...

经过使用发现yarn再下包是速度快,所以日常以yarn指令应用为主

 

npm查看仓库地址:npm config get registry
npm设置淘宝镜像:npm config set registry http://registry.npm.taobao.org/
npm还原仓库地址:npm config set registry https://registry.npmjs.org/


yarn查看仓库地址:yarn config get registry
yarn设置淘宝镜像:yarn config set registry http://registry.npm.taobao.org/
yarn还原仓库地址:yarn config set registry https://registry.yarnpkg.com

常用命令记录:

启动:yarn start

自定义端口启动:set port=xxxx & yarn start

安装所有依赖包:yarn install

安装指定依赖包:yarn add xxxx

移除指定依赖包:yarn remove xxxx

安装指定版本依赖包:yarn add xxxx@1.1

打包:yarn run build

 

相关文章:

  • 2021-12-26
  • 2021-05-28
  • 2021-09-17
  • 2021-06-08
  • 2021-11-22
  • 2021-08-20
  • 2021-08-27
  • 2022-12-23
猜你喜欢
  • 2021-08-19
  • 2021-04-11
  • 2021-09-07
  • 2022-12-23
  • 2022-01-12
  • 2021-10-09
  • 2021-11-04
相关资源
相似解决方案