1.0.1 • Published 6 years ago
@yuezheng2006/mylib v1.0.1
📚 rollup-boilerplate
Full featured boilerplate for building JavaScript libraries the modern way.
特点
- 📜 Rollup.js configuration providing compatibility with different module systems (CommonJS, ECMAScript, UMD for <script>tags)
- 🃏 Jest setup with watch mode working
- 🐈 Yarn with lock file, pinned devDependencies and fixed Yarn version in .yarnrc using Yarn policies
如何使用
项目目录
├── LICENSE
├── README.md
├── dist    打包后output文件目录
├── example 测试用目录
├── node_modules
├── package.json
├── publish.sh   yarn 发布用shell脚本
├── rollup.config.js     rollup项目配置
├── src                 原文件目录
├── test                单元测试目录
└── yarn.lock开发步骤
- 修改package.json描述文件,修改name和version等信息
- src/main.js入口文件中编写项目源码
- 修改rollup.config.js配置文件中包name名称
操作命令
调试
yarn dev打包
yarn build发布
yarn publish如果需要修改 registry 可以在
publish.sh中修改registry发布 package 推荐使用 scoped package 风格 如
@scope/xxx