npm、yarn 简单使用记录

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 [email protected]

打包:yarn run build

猜你喜欢

转载自www.cnblogs.com/JQKA/p/10278453.html