Skip to content

An Awesome Boilerplate for ES6 client-based library, using Webpack, Babel, Karma, Istanbul, Eslint, plus Travis, Coveralls, david-dm, and saucelabs

License

Notifications You must be signed in to change notification settings

CurtisHumphrey/es6-library-boilerplate

Repository files navigation

ES6 Karma Jasmine Webpack Boilerplate

Build Status Coverage Status should be red because example is purposely not fully covered Dependency Status devDependency Status Sauce Test Status

No Grunt/Gulp required!

Boilerplate for building a client-based JavaScript library in ES6 using the following features

Table of Contents

  1. Configure Steps
  2. Features
  3. Usage

Configure

  1. Change package.json main field to your library_name.js
  2. Change package.json build scripts from Calculator to your library_name.js
  3. Change webpack.config.base.js library field from calculator to your library_name
  4. Make your library while npm run test:dev is executing
  5. Setup Travis CI
  6. Setup Coveralls.io
  7. Setup saucelabs
  8. Added the SAUCE_USERNAME and SAUCE_ACCESS_KEY enviroment variables to Travis CI
  9. Update sauceLaunchers in saucelab_browsers.js
  10. Push code to github to share (should trigger Travis, sauceLabs, and Coveralls)

Features

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

About

An Awesome Boilerplate for ES6 client-based library, using Webpack, Babel, Karma, Istanbul, Eslint, plus Travis, Coveralls, david-dm, and saucelabs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •