Rollup starter kit for creating libraries
MIT License
Rollup starter kit for creating libraries (Input: ES6, Output: UMD, CommonJS, ESM)
rollup.config.js
and change the value of LIBRARY_NAME
variable with your library's name.package.json
and change the following properties with your library's equivalent
name
version
description
main
module
browser
repository
author
license
bugs
homepage
npm install
to install the library's dependencies.npm run dev
. This command will generate UMD
(unminified), CommonJS
and ESM
modules under the dist
folder. It will also watch for changes in source files to recompile.npm run build
. This command will generate the same modules as above and one extra minified UMD
bundle for usage in browser.npm run build
- Produces production version of library modules under dist
folder.npm run dev
- Produces a development version of library and runs a watcher to watch for changes.npm run test
- Runs the tests.npm run test:watch
- Runs the tests in watch mode for development.npm run test:coverage
- Runs the tests and provides with test coverage information.npm run lint
- Lints the source code with ESlint.npm run prepare
- Run both BEFORE the package is packed and published, on local npm install without any arguments, and when installing git dependencies.npm run clean
- Deletes dist
and coverage
folders.src
folder.dist
folder is excluded from source control but included for npm. You can change this behavior by not excluding this folder inside the .gitignore
file.test
folder with .spec.js
extension.