Project

rails-es6

0.0
No commit activity in last 3 years
No release in over 3 years
Babel adapter for the Rails asset pipeline.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

< 5.0, >= 4.0.0
< 4.0, >= 2.8
< 4.0, >= 2.0
~> 1.1
 Project Readme

Rails-es6

Experimental

A Babel adapter for the Rails asset pipeline. Plugin is in test mode.

Usage

  • Install babel
npm install --global babel
  • Use with Rails
# Gemfile
gem 'rails-es6'
  • Configuration
# development.rb
Rails.application.configure do
  # enable source map for debugging
  # false | 'inline'
  config.es6.source_map = 'inline'
end
  • Create es6 files
// app.js.es6

square = (x) => x * x

class Animal {
  constructor(name) {
    this.name = name
  }
}

Sprockets 3

https://github.com/josh/sprockets-es6

ToDo

  • add units
  • add possibility to off source map thru config