Supported features:
- Use Rollup .
- Support babel
stage-0
(can be customized). - Auto replacing
NODE_ENV
- Resolve Node.js module
- Show bundle file size
- Output
es
/cjs
/umd
and minified versions. - Use AVA for tests.
- Support React and jsdom (in
react
branch).
Run git clone https://github.com/malash/rollup-module-boilerplate.git
Select branch, like git checkout module
. All branch here:
Branch | Usage |
---|---|
module |
Release a plain JavaScript NPM module |
react |
Release a React Component NPM module |
Run rm -rf ./.git
and git init
to init a new repo.
Normally, you need to change these files:
File | Content |
---|---|
package.json |
All rollup-module-boilerplate / author / license |
LICENSE |
Your name and email |
src/* |
Your source code here |
test/* |
Your test code here |
Run npm run dev
.
Run npm run build
and npm publish
.
More npm
script in package.json
.
All files could be rewrite, like README.md
/ .babelrc
/ .eslintrc
and so on.