- Build minified and unminified versions of your code, with source maps
- Use ES2015 out of the box
- Write headless Karma / Mocha tests, which run in Chrome Headless and other browsers, with code coverage reports
- Integrate with Travis CI out of the box
- Write error free, type-safe code with ESLint, Flow-Type, and Flow-Runtime
- chrome headless
- Fork the module
- Run setup:
npm run setup
- Start editing code in
./srcand writing tests in
npm run build
npm run build
Edit tests in
Run the tests:npm run test
Testing with different/multiple browsers
npm run karma -- --browser=PhantomJSnpm run karma -- --browser=Chromenpm run karma -- --browser=Safarinpm run karma -- --browser=Firefoxnpm run karma -- --browser=PhantomJS,Chrome,Safari,Firefox
Keeping the browser open after tests
npm run karma -- --browser=Chrome --keep-open
Before you publish for the first time:
- Delete the example code in
- Edit the module name in
- Publish your code:
npm run releaseto add a patch
npm run release:path,
npm run release:minor,
npm run release:major
Who is this for?
- Anyone who wants a fairly healthy opinionated set of defaults to get started with
- Anyone new to writing front-end modules, who doesn't want to immediately research which modules to use to build their code
Who this is not for?
- Anyone who needs/wants tight control over their project, and which specific build tools they want to use
Why use technology X/Y/Z?
So you just took a bunch of build-tools and daisy-chained them together?
Yep, pretty much. This is not anything remotely technically impressive, or new, or innovative. It's just a healthy set of defaults to get started with if you're building a front-end distributable library.
Can I improve this template?
By all means, please feel to raise a PR, but if it's a big change, try to open an issue first so we can chat!
What about support for React, Ember, framework X or Y?
Wanted to keep this module as framework-agnostic as possible. Not to mention there are already pretty good boilerplates out there for whatever framework you're using, I'll bet. Otherwise please feel free to be my guest and fork
grumbler-superawesomeframeworkif it's helpful.