ember-es6_template 0.2.2 → 0.2.3

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: cc9281fed91e8debece31cf2ec7c7b1965daa2a1
4
- data.tar.gz: b86c0e435c11fbcc23442ece9cb73d88b4251960
3
+ metadata.gz: ace257e6e698fd347025a24e06d78fa567fe2465
4
+ data.tar.gz: a46428a1e307ae0912fedb8d60417afbdfb89b88
5
5
  SHA512:
6
- metadata.gz: 8f28cd28af9ea375004b9038ddf9c10d6a4a0bbe1901d440e60da8779dd6b1ab871e0c59368e40813eabfe0d04ea08066819d09ad4d23cba30fe90727b8de026
7
- data.tar.gz: 501606377c77574127843bfe95b38d2a7c9fe0c96c1ec5fcb3fc93cec0de47dce95b2f1c17705bf4c49e1e39b01e478dd764268e70b60d136871451c9e505b87
6
+ metadata.gz: ed7ad6993b2575d1b743b1d86ee25235a71783b4df10fb3a6c8d8b7006f81e8df9640d14ac01eb92288317cb6ed6af45d0d6b88d7404a561f7b219c9ebc85d25
7
+ data.tar.gz: 88fef67969f5446468c744c2630e5cf9a42285f362519fd71a3166fd3be50986daf847a7670b44cf63283b992d6ce76f5a9773aaafb140fcfbf7154747d36d9f
@@ -28,12 +28,21 @@ module Ember
28
28
  private
29
29
 
30
30
  def transform(data, input)
31
+ actual_name = input[:name]
32
+ if input[:filename][File.expand_path(input[:name] + '/index', input[:load_path])]
33
+ if actual_name == '.'
34
+ actual_name = 'index'
35
+ else
36
+ actual_name += '/index'
37
+ end
38
+ end
39
+
31
40
  Babel::Transpiler.transform(data,
32
41
  'modules' => 'amd',
33
42
  'moduleIds' => true,
34
43
  'sourceRoot' => input[:load_path],
35
44
  'moduleRoot' => '',
36
- 'filename' => input[:name]
45
+ 'filename' => actual_name(input)
37
46
  )
38
47
  end
39
48
 
@@ -45,6 +54,20 @@ module Ember
45
54
  Babel::Transpiler.source_version
46
55
  ]
47
56
  end
57
+
58
+ def actual_name(input)
59
+ actual_name = input[:name]
60
+
61
+ if input[:filename][File.expand_path(input[:name] + '/index', input[:load_path])]
62
+ if actual_name == '.'
63
+ actual_name = 'index'
64
+ else
65
+ actual_name += '/index'
66
+ end
67
+ end
68
+
69
+ actual_name
70
+ end
48
71
  end
49
72
  end
50
73
  end
@@ -1,5 +1,5 @@
1
1
  module Ember
2
2
  module ES6Template
3
- VERSION = '0.2.2'
3
+ VERSION = '0.2.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-es6_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryunosuke SATO