## how to publish 1. 注册npm账号 2. npm init 3. npm login 4. npm publish ### 401 查看登录日志确认是 `Logged in as 您的Username on https://registry.npmjs.org/.` 很多时候我们都会设置为淘宝镜像`http://registry.npm.taobao.org/` 1. `npm config set registry https://registry.npmjs.org/` 2. `npm adduser` 3. `npm publish`