Complexity Score
Low
Open Issues
0
Dependent Projects
16
Weekly Downloadsglobal
67
License
- MIT
- Yesattribution
- Permissivelinking
- Permissivedistribution
- Permissivemodification
- Nopatent grant
- Yesprivate use
- Permissivesublicensing
- Notrademark grant
Downloads
Readme
Sprockets ES6
Experimental
A Sprockets transformer that converts ES6 code into vanilla ES5 with Babel JS.
Usage
# Gemfile
gem 'sprockets', '>= 3.0.0'
gem 'sprockets-es6'
# application.rb
# [...]
require "action_view/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
require 'sprockets/es6'
# [...]
// app.es6
let square = (x) => x * x
class Animal {
constructor(name) {
this.name = name
}
}
Releases
This plugin is primarily experimental and will never reach a stable 1.0. The purpose is to test out BabelJS features on Sprockets 3.x and include it by default in Sprockets 4.x.
Asset manifests required for precompiling
.es6
won’t work directly with config.assets.precompile = %w( foo.es6 )
for annoying compatibility reasons with Sprockets 2.x. Besides, you should look into moving away from config.assets.precompile
and using manifests instead. See Sprockets 3.x UPGRADING guide.
Dependencies
CVE IssuesActive
0
Scorecards Score
No Data
Test Coverage
No Data
Follows Semver
Yes
Github Stars
304
Dependenciestotal
5
DependenciesOutdated
0
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No
Learn how to distribute sprockets-es6 in your own private RubyGems registry
17 Releases
RubyGems on Cloudsmith