esnext-rails
esnext adapter for the Rails asset pipeline.
Installation
Add the esnext-rails to your Gemfile:
gem 'esnext-rails'
Usage
To have a JavaScript file compiled using esnext, append the .esn
extension. For example:
// application.js.esn
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
}
console.log(new Point(1, 2));
Requesting /assets/application.js
will return the compiled version of this file.
Running tests
$ bundle install
$ bundle exec rake test
If you need to test against local gems, use Bundler's gem :path option in the Gemfile.