sprockets-es6 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sprockets/es6.rb +8 -2
- 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: 07886b86c7623766f35b878a37f92cdb4ef8dea0
|
4
|
+
data.tar.gz: 6172967581b7b5f245917a91fbefc6c30edd6967
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb351b46501d9860d6a85243644498d582abe041f578282ad50de1327db1c583dfb982c9c9f684147163054ca3e0f44d22e06b4544ab933f3201f09596481258
|
7
|
+
data.tar.gz: 64973184a53d8100ad2150d21a5e0bb4aef011c142fbbd3e68834958eda94d030270e4410a522da6ff4f3bf54736cd9e8c911cb234b943f36c7bf1d7697058eb
|
data/lib/sprockets/es6.rb
CHANGED
@@ -27,12 +27,18 @@ module Sprockets
|
|
27
27
|
def call(input)
|
28
28
|
data = input[:data]
|
29
29
|
result = input[:cache].fetch(@cache_key + [data]) do
|
30
|
-
|
30
|
+
opts = @options.merge(
|
31
31
|
'sourceRoot' => input[:load_path],
|
32
32
|
'moduleRoot' => '',
|
33
33
|
'filename' => input[:filename],
|
34
34
|
'filenameRelative' => input[:environment].split_subpath(input[:load_path], input[:filename])
|
35
|
-
)
|
35
|
+
)
|
36
|
+
|
37
|
+
if opts['moduleIds']
|
38
|
+
opts['moduleId'] ||= input[:name]
|
39
|
+
end
|
40
|
+
|
41
|
+
Babel::Transpiler.transform(data, opts)
|
36
42
|
end
|
37
43
|
result['code']
|
38
44
|
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.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Peek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: babel-transpiler
|