exoskeleton 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +7 -7
- data/lib/exoskeleton/jst_processor.rb +11 -16
- data/lib/exoskeleton/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODU4NGM1YjI0YTBjNDI4Y2M3MDFjOTQyY2U0MmNhNTljOTk1MjEzNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzA5OTAwYWIyNzMyOWNhODNkZTgyZDNkYzcwMmRkZDkyNjk3OTZjNQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDczOWU1ZDQ0NmMwMDE2MDI4NDU1NGYxOTg3ODkwNzMyYmQ1NmE0ZjFjZDYy
|
10
|
+
MzQ3MzI0ZWFjY2ZhYTQ1OGFkZTI3NzEyMjYyNDRmYzY3YjJlYmZkMmQ2MmJj
|
11
|
+
NTg5NjJiMWMyZGJiODAzMzY2NTUyMThkZmEyMDcxNWNkZmM3MDY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDc1ODY5YTNiNmRmMjZmZmNlZThiZWJiNWE1MjFhY2MxMGRiNzE4M2I1YjMw
|
14
|
+
MTg0OWIwMmI3MmQ2YmVlOWY1ZjY1MGFkYTVmNzljMmQzYzgxNjEzMDhhNmY1
|
15
|
+
MmI3M2RkOTU0MjE5YjdiZGRkNzhjNmUyMzkwY2EwOGMxZjIxZmU=
|
data/README.md
CHANGED
@@ -29,15 +29,15 @@ Add the following to `application.js` before `//= require_tree .`:
|
|
29
29
|
|
30
30
|
//= require exoskeleton
|
31
31
|
//= require ./YOUR_APP_NAME
|
32
|
-
//= require_tree ./views
|
33
|
-
//= require_tree
|
32
|
+
//= require_tree ./backbone/views
|
33
|
+
//= require_tree ./backbone/templates
|
34
34
|
|
35
|
-
Then build the folder structure to hold all of your awesome Backbone. We use the following structure
|
35
|
+
Then build the folder structure to hold all of your awesome Backbone. We use the following structure that can be built easily using the [backbone-rails](https://github.com/codebrew/backbone-rails) gem
|
36
36
|
|
37
|
-
app/assets/javascripts/views
|
38
|
-
app/assets/javascripts/models
|
39
|
-
app/assets/javascripts/collections
|
40
|
-
app/assets/templates
|
37
|
+
app/assets/javascripts/backbone/views
|
38
|
+
app/assets/javascripts/backbone/models
|
39
|
+
app/assets/javascripts/backbone/collections
|
40
|
+
app/assets/javascripts/backbone/templates
|
41
41
|
|
42
42
|
Create base javascript file `app/assets/javascripts/YOUR_APP_NAME.js` with the following content:
|
43
43
|
|
@@ -2,21 +2,16 @@ class MyJstProcessor < Sprockets::JstProcessor
|
|
2
2
|
def prepare
|
3
3
|
@namespace = "this.#{Rails.application.config.exoskeleton_base}.templates"
|
4
4
|
end
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
# #{namespace_name} || (#{namespace_name} = {});
|
17
|
-
# #{namespace_name}[#{name}] = #{indent(data)};
|
18
|
-
# }).call(this);
|
19
|
-
# JST
|
20
|
-
#end
|
5
|
+
def evaluate(scope, locals, &block)
|
6
|
+
existing_path = scope.logical_path.inspect
|
7
|
+
new_path = existing_path.gsub 'backbone/templates/', ''
|
8
|
+
|
9
|
+
<<-JST
|
10
|
+
(function() {
|
11
|
+
#{namespace} || (#{namespace} = {});
|
12
|
+
#{namespace}[#{new_path}] = #{indent(data)};
|
13
|
+
}).call(this);
|
14
|
+
JST
|
15
|
+
end
|
21
16
|
end
|
22
17
|
|
data/lib/exoskeleton/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exoskeleton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Hopp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|