1.0.1 • Published 6 years ago

@yuezheng2006/mylib v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

📚 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描述文件,修改nameversion等信息
  • src/main.js入口文件中编写项目源码
  • 修改rollup.config.js配置文件中包name名称

操作命令

调试

yarn dev

打包

yarn build

发布

yarn publish

如果需要修改 registry 可以在publish.sh中修改registry

发布 package 推荐使用 scoped package 风格 如@scope/xxx