Easily create JavaScript open-source projects that works on browsers, Node.js and bundlers (e.g. Webpack).
First create a repository for your lib. After that you should clone this starter kit without the .git
folder (so it don't mess with your repo).
You can do it manually by cloning this repo on another folder, deleting the .git
folder and copying the remaining files to your project, or you can simply use degit to do this job faster:
degit kazzkiq/open-source-starter-kit
To watch files and compile while in dev:
npm run dev
To compile for production:
npm run build
To run local tests:
npm test
This project uses Rollup as module bundler, Sirv for web server, Buble for simple basic ES6+ to ES5 transpiling, Mocha and Chai for testing and Terser for code compression.
In order to publish a package, you can run:
npm publish
Always remember to increase your package version before publishing a change and remember to use SemVer system for your projects.