# Sprockets 3 + ES6 + SystemJS Demo
Rails 3 app demoing Sprockets 2, ES6 and SytemsJS. Rails Assets is used to include JS packages such as React and SystemJS.
JS files ending with ‘.js.es6` will be compiled using the `sprockets2-es6` gem, see `geom.js.es6`, `math.js.es6` and `main.js.es6` in `/app/assets/javascripts/app/`. Multiple ES6 files can be bundled by using the Sprockets `//= require` declarations, see `/app/assets/javascripts/app.js`.
The application layout loads SystemJS, sets up its configuration, and loads the ‘assets/systemjs.config.js` file which is auto-generated using an ERB template. This file contains the mapping of bundles to the files they contain:
“‘js System.config({
"bundles": { "assets/app": [ "app/geom", "app/main", "app/math" ] }
}); “‘
## Running
* Run `bundle install` * Run `rails s` * Run `open http://localhost:3000`