ember-handlebars-template 0.7.2 → 0.7.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/handlebars/template.rb +9 -3
- 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: 16ecf940925fea527d60bf6f1589a49058f99a5c
|
4
|
+
data.tar.gz: f5d12ab8225fa4297ee82250a4a5da780c2ea42d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bf29f8634294e12fe36466edb5bcae1cc5356c66e9770f7545ab4971e12d06ce312eb5ef4c742f1401f5b7c5ffe4d9eb5446f4c1adcd4f1ab5e5fd5ced4c250
|
7
|
+
data.tar.gz: 704dda831fb06fb00c28c358abd9e22dca6c069596fd48533d1af5b5698a9c42aea2aadf8a1399969ec0d8c617c5621b17f6eb5bf4a0f7be97aa1ebf5cf1c662
|
@@ -20,13 +20,13 @@ module Ember
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def setup(env)
|
23
|
-
env.register_mime_type 'text/x-handlebars', extensions: %w(.raw.hbs .raw.hjs .raw.handlebars)
|
23
|
+
env.register_mime_type 'text/x-handlebars', extensions: with_js_extension(%w(.raw.hbs .raw.hjs .raw.handlebars))
|
24
24
|
env.register_transformer 'text/x-handlebars', 'application/javascript', self
|
25
25
|
|
26
|
-
env.register_mime_type 'text/x-ember-mustache', extensions: %w(.mustache.hbs .mustache.hjs .mustache.handlebars)
|
26
|
+
env.register_mime_type 'text/x-ember-mustache', extensions: with_js_extension(%w(.mustache.hbs .mustache.hjs .mustache.handlebars))
|
27
27
|
env.register_transformer 'text/x-ember-mustache', 'application/javascript', self
|
28
28
|
|
29
|
-
env.register_mime_type 'text/x-ember-handlebars', extensions: %w(.hbs .hjs .handlebars)
|
29
|
+
env.register_mime_type 'text/x-ember-handlebars', extensions: with_js_extension(%w(.hbs .hjs .handlebars))
|
30
30
|
env.register_transformer 'text/x-ember-handlebars', 'application/javascript', self
|
31
31
|
end
|
32
32
|
|
@@ -41,6 +41,12 @@ module Ember
|
|
41
41
|
def handlebars_available?
|
42
42
|
Barber::Precompiler.handlebars_available?
|
43
43
|
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def with_js_extension(extensions)
|
48
|
+
extensions + extensions.map {|ext| ".js#{ext}" }
|
49
|
+
end
|
44
50
|
end
|
45
51
|
|
46
52
|
attr_reader :config
|