ember-middleman 0.0.4 → 0.0.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f191f2813cdf9d7ed789d174f53f66bf9c50628e
|
4
|
+
data.tar.gz: d837e70e043484581b14435320abfc6130635f4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65cc630f2342672389e7bbd4e4543ecee5bf6a66eb2bab4ff95a0cae13435cc069f4f2db24d16331e98313aa856077b250415e7162ede64bbb59c4760294b2ec
|
7
|
+
data.tar.gz: f10759fa2dcbd731544dcb968178fc94c216d987eca94b0e5394fb217ef84a223ad86fb84f50e626b0d8399db9b643ac42bf10ccc94fbf1c6c96c8023d0e9f47
|
@@ -3,3 +3,8 @@ Feature: Handlebars compilation
|
|
3
3
|
Given the Server is running at "handlebars-compilation"
|
4
4
|
When I go to "/javascripts/templates.js"
|
5
5
|
Then I should see 'Ember.TEMPLATES["ok_button"]'
|
6
|
+
|
7
|
+
Scenario: Access template as JS file
|
8
|
+
Given the Server is running at "handlebars-compilation"
|
9
|
+
When I go to "/javascripts/templates/ok_button.js"
|
10
|
+
Then I should see 'Ember.TEMPLATES["ok_button"]'
|
@@ -20,18 +20,24 @@ module Ember
|
|
20
20
|
yield config if block_given?
|
21
21
|
|
22
22
|
app.before_configuration do
|
23
|
-
template_extensions :
|
23
|
+
template_extensions handlebars: :js,
|
24
|
+
hbs: :js,
|
25
|
+
hjs: :js
|
24
26
|
end
|
25
27
|
|
26
28
|
app.after_configuration do
|
27
29
|
sprockets.append_path ::Ember::Source.bundled_path_for(nil)
|
28
30
|
sprockets.append_path ::Ember::Data::Source.bundled_path_for(nil)
|
29
31
|
sprockets.append_path File.dirname(::Handlebars::Source.bundled_path)
|
32
|
+
|
33
|
+
sprockets.register_engine '.handlebars', Ember::Middleman::Handlebars::Template
|
34
|
+
sprockets.register_engine '.hbs', Ember::Middleman::Handlebars::Template
|
35
|
+
sprockets.register_engine '.hjs', Ember::Middleman::Handlebars::Template
|
30
36
|
end
|
31
37
|
|
32
|
-
|
33
|
-
|
34
|
-
|
38
|
+
::Tilt.register '.handlebars', Ember::Middleman::Handlebars::Template
|
39
|
+
::Tilt.register '.hbs', Ember::Middleman::Handlebars::Template
|
40
|
+
::Tilt.register '.hjs', Ember::Middleman::Handlebars::Template
|
35
41
|
end
|
36
42
|
end
|
37
43
|
end
|
@@ -8,9 +8,7 @@ module Ember
|
|
8
8
|
module Middleman
|
9
9
|
module Handlebars
|
10
10
|
class Template < Tilt::Template
|
11
|
-
|
12
|
-
'application/javascript'
|
13
|
-
end
|
11
|
+
self.default_mime_type = 'application/javascript'
|
14
12
|
|
15
13
|
def self.configuration
|
16
14
|
@configuration ||= OpenStruct.new
|
@@ -49,6 +47,10 @@ module Ember
|
|
49
47
|
self.class.configuration
|
50
48
|
end
|
51
49
|
|
50
|
+
def allows_script?
|
51
|
+
false
|
52
|
+
end
|
53
|
+
|
52
54
|
private
|
53
55
|
|
54
56
|
def handlebars?(scope)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ember-middleman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryunosuke SATO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: barber
|