ember-handlebars-template 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +5 -0
- data/ember-handlebars-template.gemspec +1 -1
- data/lib/ember/handlebars/template.rb +5 -6
- data/lib/ember/handlebars/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5744d3b9b24248f8609857f494064811828923c
|
4
|
+
data.tar.gz: ef2b7dc7ef60c2594765e54521c5c4d279cd5ba8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a77d2223615be19760c78831bf3048969cb9ae955ced1f05c5c8eb7f284b914cd63afdb7275744e711f13ccefb0414ce6aaf0a08a03680943184e5534af57a0d
|
7
|
+
data.tar.gz: e27db631a2ac583cb31da3c9183f21be2854c59f5bd73600573ae8f6e796ea1df07280dee43d4066ad3172b81a28905d089671ba733528cc20de830d4d7de66c
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -25,7 +25,12 @@ $ gem install ember-handlebars-template
|
|
25
25
|
## Usage
|
26
26
|
|
27
27
|
``` ruby
|
28
|
+
# Sprockets 2.x way
|
28
29
|
Sprockets.register_engine '.hbs', Ember::Handlebars::Template # or other extension which you like.
|
30
|
+
|
31
|
+
# Sprockets 3.x/4.x way
|
32
|
+
Sprockets.register_mime_type 'text/x-handlebars', extensions: ['.hbs'] # or other extension which you like.
|
33
|
+
Sprockets.register_transformer 'text/x-handlebars', 'application/javascript', Ember::Handlebars::Template
|
29
34
|
```
|
30
35
|
|
31
36
|
It can also compile "raw" templates – pure Handlebars templates, independent of Ember. They need to have a suffix `.raw.hbs` (the last extension depends on what was registered with `register_engine`).
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'sprockets', '>= 3.3', '<
|
21
|
+
spec.add_dependency 'sprockets', '>= 3.3', '< 4'
|
22
22
|
spec.add_dependency 'barber', '>= 0.11.0'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
@@ -20,12 +20,11 @@ module Ember
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def setup(env)
|
23
|
-
%w(.raw.hbs .raw.hjs .raw.handlebars
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
23
|
+
env.register_mime_type 'text/x-handlebars', extensions: %w(.raw.hbs .raw.hjs .raw.handlebars)
|
24
|
+
env.register_transformer 'text/x-handlebars', 'application/javascript', self
|
25
|
+
|
26
|
+
env.register_mime_type 'text/x-ember-handlebars', extensions: %w(.hbs .hjs .handlebars)
|
27
|
+
env.register_transformer 'text/x-ember-handlebars', 'application/javascript', self
|
29
28
|
end
|
30
29
|
|
31
30
|
def instance
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ember-handlebars-template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryunosuke SATO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3.3'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '4'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3.3'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '4'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: barber
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|