A simple Boilerplate to easily build JS Libraries with Browserify, Watchify, Babel and UglifyJS
Download to your project directory, add README.md
, and commit:
git clone https://github.com/jsrbn/js-library-boilerplate
You can either build, watch or minify your library:
# use this to build your library and to create a minified version of it at the same time
# using yarn
yarn build
# using npm
npm run build
# use this to minify the library.js file to library.min.js
# using yarn
yarn minify
# using npm
npm run minify
# use this to build your code every time you update it. Note: It won't be minified automatically
# using yarn
yarn watch
# using npm
npm run watch
I created this repo because I ran through the problem of creating an environment for a standalone-library I wanted to build. There was no boilerplate which had the following features:
- Babel Next
- Modules with Browserify or Webpack
- Live Build (Watchify)
- Code minimizing (UglifyJS)
so I had to create my own.
Please open an issue for support.
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.