CurtisHumphrey / Es6 Library Boilerplate
Licence: mit
An Awesome Boilerplate for ES6 client-based library, using Webpack, Babel, Karma, Istanbul, Eslint, plus Travis, Coveralls, david-dm, and saucelabs
Stars: ✭ 38
Programming Languages
javascript
184084 projects - #8 most used programming language
ES6 Karma Jasmine Webpack Boilerplate
should be red because example is purposely not fully covered
No Grunt/Gulp required!
Boilerplate for building a client-based JavaScript library in ES6 using the following features
Table of Contents
Configure
- Change package.json main field to your library_name.js
- Change package.json build scripts from Calculator to your library_name.js
- Change webpack.config.base.js library field from calculator to your library_name
- Make your library while
npm run test:dev
is executing - Setup Travis CI
- Setup Coveralls.io
- Setup saucelabs
- Added the
SAUCE_USERNAME
andSAUCE_ACCESS_KEY
enviroment variables to Travis CI - Update sauceLaunchers in saucelab_browsers.js
- Push code to github to share (should trigger Travis, sauceLabs, and Coveralls)
Features
- Webpack
-
Karma
- Mocha w/ chai, sinon-chai, and chai-as-promised
- Rewire enabled
- PhantomJS and Chrome
- Code coverage reports
- Uploading to coveralls (https://github.com/caitp/karma-coveralls)
-
Babel (
^6.3.0
)- babel-plugin-transform-runtime so transforms aren't inlined
- babel-istanbul
-
ESLint
- Uses airbnb/base plus some additional good rules
Usage
-
npm run test
- Runs unit tests with Karma and generates a coverage report -
npm run test:dev
- Runs Karma and watches for changes to re-run tests also runs view-coverage -
npm run test:web
- same as test but runs them in Chrome -
npm run test:dev:web
- same as test:dev but runs them in Chrome -
npm run view-coverage
- Runs a watching server on the code coverage folder and opens it at port 3001 -
npm run lint
- Lint all.js
files. -
npm run lint:fix
- Lint and fix all.js
files. Read more on this. -
npm run clean
- removes the dist and build folders -
npm run build
- produces your library
Credits
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].