sprockets-es6 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/sprockets/es6.rb +13 -4
- data/lib/sprockets/es6/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 388d14d771cc7935a13046f9af297e57fd36c285
|
4
|
+
data.tar.gz: 7022333e42c14c148be965aa724c8b24a5622e23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8abd4a98c04fa068ec412966d7359cc79e403e8364ab9334f09395ceb71a7d26193d3446aa52eec187b677525b1401898c931dec900f6fb5d010481af8181373
|
7
|
+
data.tar.gz: 91ae719e7aa8055892994800622a827eacbbdcb7be3e0c1f5888588dd54255ffd9acdb655c9a669e5ce1b1cc4dd3873a85ff0d39c872098fe4d1b76d96a4f90c
|
data/README.md
CHANGED
data/lib/sprockets/es6.rb
CHANGED
@@ -84,8 +84,17 @@ module Sprockets
|
|
84
84
|
end
|
85
85
|
|
86
86
|
append_path Babel::Transpiler.source_path
|
87
|
-
|
88
|
-
register_transformer
|
89
|
-
|
90
|
-
|
87
|
+
|
88
|
+
if respond_to?(:register_transformer)
|
89
|
+
register_mime_type 'text/ecmascript-6', extensions: ['.es6'], charset: :unicode
|
90
|
+
register_transformer 'text/ecmascript-6', 'application/javascript', ES6
|
91
|
+
register_preprocessor 'text/ecmascript-6', DirectiveProcessor
|
92
|
+
end
|
93
|
+
|
94
|
+
if respond_to?(:register_engine)
|
95
|
+
args = ['.es6', ES6]
|
96
|
+
args << { mime_type: 'text/ecmascript-6', silence_deprecation: true } if Sprockets::VERSION.start_with?("3")
|
97
|
+
register_engine(*args)
|
98
|
+
end
|
99
|
+
|
91
100
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-es6
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Peek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02
|
11
|
+
date: 2016-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: babel-transpiler
|