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 +4 -4
- data/lib/ember/es6_template/sprockets3/es6module.rb +24 -1
- data/lib/ember/es6_template/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ace257e6e698fd347025a24e06d78fa567fe2465
|
4
|
+
data.tar.gz: a46428a1e307ae0912fedb8d60417afbdfb89b88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|