npm发包流程
npm常用命令
1 |
|
NPM镜像
查询
npm get registry
设官方
npm config set registry https://registry.npmjs.org/
设淘宝
npm config set registry https://registry.npm.taobao.org/
Yarn
查询
yarn config get registry
设官方
yarn config set registry https://registry.yarnpkg.com
设淘宝
yarn config set registry https://registry.npm.taobao.org/
使用babel将代码转es5
在根目录新建.babelrc文件中写入如下内容
1 |
|
将代码转为es5
1 |
|
同步淘宝镜像
如果使用了淘宝镜像,需要立即同步,有下面两种办法:
1 |
|
1 |
|
npm发包流程
http://example.com/20200728-npm/