This is a small template project to help with library development. It includes all the required building blocks already set up ready to use. There are a couple of conventions to consider.
- Source code is in the "src folder"
- Tests have the same name as the src file but also includes ".test" at the end of the name. For example "my-class.test.js"
- index.js found in the src folder is the bundling entry and exports the library api using the export function
- Jest tests configured for ES6
- Rollup bundling with minification using Tensor
- Build publish folder
The package.json file has two scripts defined for common use.
- Test
- Bundle
- Publish
Jest is set up to allow es6 using Babel.
It also includes code completion.
Use the publish node script to bundle your files and copy them to the publish folder.
The following files will automatically be copied to the publish folder:
- All your files located in the dist folder
- package.json file with the version number updated
- readme.md
If you want other files to be included, update "distribute" function in the /build/publish.js file.