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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 661c005dad918587ad5ffa2a738b4a826f484a3a
4
- data.tar.gz: 1d6dc39a2036f8eadc4cde6b0e58b0068b557969
3
+ metadata.gz: b89642ce48db11a7b24ced07182f516116b9f372
4
+ data.tar.gz: dff5a9a6159317c195ffe3e18561232dc9865ce0
5
5
  SHA512:
6
- metadata.gz: 27e48a0469752c936954eb165ec13b517080a631c6f68d5487866177d0fced2e04c01342f1393ac8f6ba25c7cd898a8c764d65d2a379ca76e49425e5a83fb3a5
7
- data.tar.gz: 360ded629dfb2979ae65a1801abd8391d893c421781a6da735f0fb5077b4b3219ca4ae9daddb4f3b51d34acaa56fb79b920af4b5fd08e32c40756e0564127ba5
6
+ metadata.gz: 28f7b10205927ca3cc5ae908c0ef7c2a60b2a94b653247d3316b688cc3acde65c016f537c419f602ff6bf8ae647dde7d4d755944c74e540f56dd92bacf0884ac
7
+ data.tar.gz: b292ffeae23fdfc7210b187671b75e96478ee008fca00f0eafb327b6a3c619006c51c582c9e03d470f49b548dc997208bd2f361c891bc90ca1a85133c75d75d7
@@ -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(cache_key + [data]) do
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 cache_key
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
- result = Babel::Transpiler.transform(
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
- return super
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(cache_key + [data]) do
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 cache_key
32
+ def _cache_key
33
33
  [
34
34
  self.class.name,
35
35
  VERSION,
@@ -1,3 +1,5 @@
1
+ require 'coffee_script'
2
+
1
3
  module Ember
2
4
  module ES6Template
3
5
  class ES6 < ::Tilt::Template
@@ -12,7 +12,7 @@ module Ember
12
12
  def call(input)
13
13
  data = input[:data]
14
14
 
15
- result = input[:cache].fetch(cache_key + [data]) do
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 cache_key
34
+ def _cache_key
35
35
  [
36
36
  self.class.name,
37
37
  VERSION,
@@ -1,5 +1,5 @@
1
1
  module Ember
2
2
  module ES6Template
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
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.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-01 00:00:00.000000000 Z
11
+ date: 2015-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: babel-transpiler