npm (二)

npm 包的发布

  • 必须是npm 的源 我们常用的是淘宝镜像
  • 查看当前源 nrm ls
  • 更改当前源 npm config set registry https://registry.npmjs.org/
  • npm login 登录
  • npm publish 上传
  • 下次再上传 要改版本
  • pack.json
    "name": "cj-ui-com",
    "version": "0.1.1",
    "private": false,  //  必须为false
    "main": "dist/cj-ui.umd.min.js",  // 配置文件入口

猜你喜欢

转载自blog.csdn.net/qq_38686150/article/details/113405783
NPM