danschultz / rails_3_es6_demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

# 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`
ezoic increase your site revenue

About


Languages

Language:Ruby 69.0%Language:HTML 20.7%Language:JavaScript 7.1%Language:CSS 2.4%Language:CoffeeScript 0.8%