ember-es6_template 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ember/es6_template.rb +0 -1
- data/lib/ember/es6_template/coffee_script_helper.rb +2 -2
- data/lib/ember/es6_template/coffee_script_sprockets2.rb +4 -12
- data/lib/ember/es6_template/es6.rb +2 -2
- data/lib/ember/es6_template/es6_sprockets2.rb +2 -0
- data/lib/ember/es6_template/es6module.rb +2 -2
- data/lib/ember/es6_template/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: b89642ce48db11a7b24ced07182f516116b9f372
|
4
|
+
data.tar.gz: dff5a9a6159317c195ffe3e18561232dc9865ce0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28f7b10205927ca3cc5ae908c0ef7c2a60b2a94b653247d3316b688cc3acde65c016f537c419f602ff6bf8ae647dde7d4d755944c74e540f56dd92bacf0884ac
|
7
|
+
data.tar.gz: b292ffeae23fdfc7210b187671b75e96478ee008fca00f0eafb327b6a3c619006c51c582c9e03d470f49b548dc997208bd2f361c891bc90ca1a85133c75d75d7
|
data/lib/ember/es6_template.rb
CHANGED
@@ -28,7 +28,6 @@ module Ember
|
|
28
28
|
env.register_engine '.module.es6', ES6Module, mime_type: 'application/javascript'
|
29
29
|
env.register_engine '.module.coffee', CoffeeScriptModule, mime_type: 'application/javascript'
|
30
30
|
env.register_engine '.coffee', CoffeeScript, mime_type: 'application/javascript' # Force parse as ES6
|
31
|
-
|
32
31
|
end
|
33
32
|
else
|
34
33
|
raise "Unsupported sprockets version: #{Sprockets::VERSION}"
|
@@ -4,7 +4,7 @@ module Ember
|
|
4
4
|
def call(input)
|
5
5
|
data = input[:data]
|
6
6
|
|
7
|
-
result = input[:cache].fetch(
|
7
|
+
result = input[:cache].fetch(_cache_key + [data]) do
|
8
8
|
transform(
|
9
9
|
Sprockets::Autoload::CoffeeScript.compile(data, bare: true),
|
10
10
|
input
|
@@ -16,7 +16,7 @@ module Ember
|
|
16
16
|
|
17
17
|
private
|
18
18
|
|
19
|
-
def
|
19
|
+
def _cache_key
|
20
20
|
[
|
21
21
|
self.class.name,
|
22
22
|
VERSION,
|
@@ -7,15 +7,7 @@ module Ember
|
|
7
7
|
filename = scope.pathname.to_s
|
8
8
|
|
9
9
|
if es6_module?(filename)
|
10
|
-
|
11
|
-
::CoffeeScript.compile(data, bare: true),
|
12
|
-
'modules' => 'amd',
|
13
|
-
'moduleIds' => true,
|
14
|
-
'sourceRoot' => env.root,
|
15
|
-
'moduleRoot' => '',
|
16
|
-
'filename' => scope.logical_path,
|
17
|
-
'blacklist' => ['es6.modules'] # Next precessor transpile module syntax
|
18
|
-
)
|
10
|
+
::CoffeeScript.compile(data, bare: true)
|
19
11
|
elsif es6?(filename)
|
20
12
|
result = Babel::Transpiler.transform(
|
21
13
|
::CoffeeScript.compile(data, bare: true),
|
@@ -23,11 +15,11 @@ module Ember
|
|
23
15
|
'moduleRoot' => '',
|
24
16
|
'filename' => scope.logical_path
|
25
17
|
)
|
18
|
+
|
19
|
+
result['code']
|
26
20
|
else
|
27
|
-
|
21
|
+
super
|
28
22
|
end
|
29
|
-
|
30
|
-
result['code']
|
31
23
|
end
|
32
24
|
|
33
25
|
private
|
@@ -12,7 +12,7 @@ module Ember
|
|
12
12
|
def call(input)
|
13
13
|
data = input[:data]
|
14
14
|
|
15
|
-
result = input[:cache].fetch(
|
15
|
+
result = input[:cache].fetch(_cache_key + [data]) do
|
16
16
|
transform(data, input)
|
17
17
|
end
|
18
18
|
|
@@ -29,7 +29,7 @@ module Ember
|
|
29
29
|
)
|
30
30
|
end
|
31
31
|
|
32
|
-
def
|
32
|
+
def _cache_key
|
33
33
|
[
|
34
34
|
self.class.name,
|
35
35
|
VERSION,
|
@@ -12,7 +12,7 @@ module Ember
|
|
12
12
|
def call(input)
|
13
13
|
data = input[:data]
|
14
14
|
|
15
|
-
result = input[:cache].fetch(
|
15
|
+
result = input[:cache].fetch(_cache_key + [data]) do
|
16
16
|
transform(data, input)
|
17
17
|
end
|
18
18
|
|
@@ -31,7 +31,7 @@ module Ember
|
|
31
31
|
)
|
32
32
|
end
|
33
33
|
|
34
|
-
def
|
34
|
+
def _cache_key
|
35
35
|
[
|
36
36
|
self.class.name,
|
37
37
|
VERSION,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ember-es6_template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryunosuke SATO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: babel-transpiler
|