<commit_before>vanilla-es6-jspm
================

[![Build Status](https://travis-ci.org/topheman/vanilla-es6-jspm.svg?branch=master)](https://travis-ci.org/topheman/vanilla-es6-jspm)
[![devDependency Status](https://david-dm.org/topheman/vanilla-es6-jspm/dev-status.svg)](https://david-dm.org/topheman/vanilla-es6-jspm#info=devDependencies)

**ES6** is here and you can't avoid it. We have great tools to make it work, one of them is **jspm**.

jspm is great but all-in-one yeoman generators or seed projects (with build/sass/livereload/sourcemaps/unit-tests ...) are still lacking, so I decided to make my own angular/ES6/jspm stack.

This project is the first step: a **vanillaJS/ES6/jspm boilerplate** ([more infos on the Wiki](https://github.com/topheman/vanilla-es6-jspm/wiki)).

##Features

* Simple ES6 app using basic **ES6 features**
	* so that you won't have to struggle to understand the code base
	* but advanced enough to be used as an example
* Use **ES6 Modules** via [SystemJS module loader](https://github.com/systemjs/systemjs) (built on top of [ES6 Module Loader Polyfill](https://github.com/ModuleLoader/es6-module-loader))
* Manage development and production workflow with [jspm](http://jspm.io/), [SystemJS Builder](https://github.com/systemjs/builder) and [Gulp](http://gulpjs.com/).
* Backend mocking / stubs / overriding of the module loader
* **Karma unit tests** (using mocks and stubs)
* **e2e testing** with protractor *(in progress)*
* Produce optimized, production ready code for deployment
* **Continuous Integration** ready (tests via [Travis CI](https://travis-ci.org/topheman/vanilla-es6-jspm))

##Requirements

* node/npm
* gulp `npm install -g gulp-cli`
* jspm (latest : `0.16.0-beta.3`) - `npm install -g jspm@beta`
* sass - [installation](http://sass-lang.com/install)

##Installation

* `npm install` (it will automatically trigger the `jspm install` at `postinstall`)

##Launch

You can launch your app in different modes (dev/prod/test):

* `gulp serve` : **will launch a dev server**
* `gulp serve:prod` : will launch the version of the site built in `build/dist` folder (need to `gulp build` before) - *usefull to check your site before deploying it*.
* `gulp serve:test` : will launch a dev server with test configuration - *usefull to debug / create unit tests*:
	* jspm configuration overridden by the `test/jspm.override.json` file
	* the app will appear with "TEST" in background, thanks to `test/fixtures/bs.snippet.html` injected on the the fly (containing specific css)

##Build

* `gulp build` : builds a production ready version of the site in `build/dist` folder

##Test

You can see exactly which commands match the following npm tasks in the [package.json](https://github.com/topheman/vanilla-es6-jspm/blob/master/package.json#L6).

* `npm test`: runs all the tests (will be triggered on `git-pre-commit`)
* `npm run test-unit`: runs the unit tests through `karma`<commit_msg>docs(README) update README with new jspm version<commit_after>vanilla-es6-jspm
================

[![Build Status](https://travis-ci.org/topheman/vanilla-es6-jspm.svg?branch=master)](https://travis-ci.org/topheman/vanilla-es6-jspm)
[![devDependency Status](https://david-dm.org/topheman/vanilla-es6-jspm/dev-status.svg)](https://david-dm.org/topheman/vanilla-es6-jspm#info=devDependencies)

**ES6** is here and you can't avoid it. We have great tools to make it work, one of them is **jspm**.

jspm is great but all-in-one yeoman generators or seed projects (with build/sass/livereload/sourcemaps/unit-tests ...) are still lacking, so I decided to make my own angular/ES6/jspm stack.

This project is the first step: a **vanillaJS/ES6/jspm boilerplate** ([more infos on the Wiki](https://github.com/topheman/vanilla-es6-jspm/wiki)).

##Features

* Simple ES6 app using basic **ES6 features**
	* so that you won't have to struggle to understand the code base
	* but advanced enough to be used as an example
* Use **ES6 Modules** via [SystemJS module loader](https://github.com/systemjs/systemjs) (built on top of [ES6 Module Loader Polyfill](https://github.com/ModuleLoader/es6-module-loader))
* Manage development and production workflow with [jspm](http://jspm.io/), [SystemJS Builder](https://github.com/systemjs/builder) and [Gulp](http://gulpjs.com/).
* Backend mocking / stubs / overriding of the module loader
* **Karma unit tests** (using mocks and stubs)
* **e2e testing** with protractor *(in progress)*
* Produce optimized, production ready code for deployment
* **Continuous Integration** ready (tests via [Travis CI](https://travis-ci.org/topheman/vanilla-es6-jspm))

##Requirements

* node/npm
* gulp `npm install -g gulp-cli`
* jspm `npm install -g jspm` (v0.16.0)
* sass - [installation](http://sass-lang.com/install)

NB: `gulp`, `jspm`, `karma` ... are all installed locally so if you don't want install them globally (because you have specific versions for example), you can call them from `./node_modules/.bin/`.

##Installation

* `npm install` (it will automatically trigger the `jspm install` at `postinstall`)

##Launch

You can launch your app in different modes (dev/prod/test):

* `gulp serve` : **will launch a dev server**
* `gulp serve:prod` : will launch the version of the site built in `build/dist` folder (need to `gulp build` before) - *usefull to check your site before deploying it*.
* `gulp serve:test` : will launch a dev server with test configuration - *usefull to debug / create unit tests*:
	* jspm configuration overridden by the `test/jspm.override.json` file
	* the app will appear with "TEST" in background, thanks to `test/fixtures/bs.snippet.html` injected on the the fly (containing specific css)

##Build

* `gulp build` : builds a production ready version of the site in `build/dist` folder

##Test

You can see exactly which commands match the following npm tasks in the [package.json](https://github.com/topheman/vanilla-es6-jspm/blob/master/package.json#L6).

* `npm test`: runs all the tests (will be triggered on `git-pre-commit`)
* `npm run test-unit`: runs the unit tests through `karma`
{'fraction_non_alphanumeric': 0.1340901612372491, 'fraction_numerical': 0.007403751233958539, 'mean_word_length': 4.62349676225717, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4381577', 'n_tokens_mistral': 1983, 'n_tokens_neox': 1921, 'n_words': 665}