0.3.3 • Published 5 years ago
generator-eslib v0.3.3
JS lib generator
Yeoman generator for Javascript library.
Features
- use rollup to build the javascript
- babel convert es6
- build for 3 formats: cjs, esm, umd
Usage
To install generator-eslib from npm, run:
$ npm install --global yo generator-eslib
Make a new directory and cd into it:
$ mkdir mylib
Finally, initiate the generator:
$ yo eslib
Npm scripts
- Run
npm run build
to build javascript library - Run
npm run dev
to build and watch for changes - Run
npm run test
to run mocha test
Layout
|- mylib
|- .editorconfig // Example .editorconfig (http://editorconfig.org/)
|- .gitignore // Basic .gitignore
|- .rollup.config.js // Rollup config file
|- README.md // Basic README file
|- package.json // Basic Npm configuration
|- dist // Folder for your distributables
|- <lib>.umd.js
|- <lib>.cjs.js
|- <lib>.esm.js
|- src // Folder for your library source !!
|- main.js // the entry js
|- .babelrc // Babel config file
|- test // Folder for your tests
License
MIT