ember-handlebars-template 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ember/handlebars/templates/sprockets3.rb +16 -5
- data/lib/ember/handlebars/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: a634817413b985932816f357b9869f19005c1913
|
4
|
+
data.tar.gz: 32837cf31232756ad9cc579f3f2173e842e3fe7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0546a34e7d35b5fb4033d827483f0123c409a2b6f464a081d4714529c9940f8a9fc378ee83b0ca9e272260880515b1a76140d0245453881409e33fead69838ae
|
7
|
+
data.tar.gz: d8dad71e61b76fa7d79828a986363f1a993a1ca253a5696b7e2aab11bb2859cbd04639d02cab7127db21c4905a6a32045a6a36cdc4bd1c21ecfde20de884a867
|
@@ -58,16 +58,13 @@ module Ember
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
actual_name = input[:name]
|
62
|
-
actual_name += '/index' if input[:filename][input[:load_path] + '/' + input[:name] + '/index']
|
63
|
-
|
64
61
|
case config.output_type
|
65
62
|
when :amd
|
66
|
-
target = amd_template_target(config.amd_namespace, actual_name)
|
63
|
+
target = amd_template_target(config.amd_namespace, actual_name(input))
|
67
64
|
|
68
65
|
"define('#{target}', ['exports'], function(__exports__){ __exports__['default'] = #{template} });"
|
69
66
|
when :global
|
70
|
-
target = global_template_target(actual_name, config)
|
67
|
+
target = global_template_target(actual_name(input), config)
|
71
68
|
|
72
69
|
"#{target} = #{template}\n"
|
73
70
|
else
|
@@ -107,6 +104,20 @@ module Ember
|
|
107
104
|
Barber::VERSION
|
108
105
|
]
|
109
106
|
end
|
107
|
+
|
108
|
+
def actual_name(input)
|
109
|
+
actual_name = input[:name]
|
110
|
+
|
111
|
+
if input[:filename][File.expand_path(input[:name] + '/index', input[:load_path])]
|
112
|
+
if actual_name == '.'
|
113
|
+
actual_name = 'index'
|
114
|
+
else
|
115
|
+
actual_name += '/index'
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
actual_name
|
120
|
+
end
|
110
121
|
end
|
111
122
|
end
|
112
123
|
end
|