dynamic_assets 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +7 -7
- data/lib/dynamic_assets/reference.rb +1 -1
- metadata +5 -5
data/README.rdoc
CHANGED
@@ -21,7 +21,7 @@ Out of the box it can (optionally):
|
|
21
21
|
(Example: You may want a set of stylesheets for your main interface, and another set for your admin
|
22
22
|
interface, maybe with some overlap. With DynamicAssets, your normal users won't pay the
|
23
23
|
penalty of downloading your admin styles.)
|
24
|
-
* Allow CSS assets to refer to static images through relative URLs. That is, it doesn't break CSS
|
24
|
+
* Allow CSS assets to refer to static images through relative URLs. That is, it doesn't break CSS URLs.
|
25
25
|
* Honor Rails' scheme for asset hosts.
|
26
26
|
* Honor Rails' scheme for cache-busting.
|
27
27
|
|
@@ -29,7 +29,7 @@ It seems that Rails 3.1 will offer many of these features off-the-shelf, which i
|
|
29
29
|
cool. DynamicAssets allows you to get some of those features today in 3.0, but it
|
30
30
|
wasn't intended as a back port or a stopgap. It just happens that serving assets
|
31
31
|
dynamically is useful enough that multiple people have thought of implementing it.
|
32
|
-
(See also: {Shoebox}[https://github.com/ddollar/shoebox])
|
32
|
+
(See also: {Shoebox}[https://github.com/ddollar/shoebox] and {Sprockets}[http://getsprockets.org/])
|
33
33
|
|
34
34
|
== How To
|
35
35
|
|
@@ -37,8 +37,8 @@ dynamically is useful enough that multiple people have thought of implementing i
|
|
37
37
|
|
38
38
|
gem "dynamic_assets"
|
39
39
|
|
40
|
-
2. Put your CSS files in <tt>app/
|
41
|
-
<tt>app/
|
40
|
+
2. Put your CSS files in <tt>app/assets/stylesheets</tt> and your JS files in
|
41
|
+
<tt>app/assets/javascripts</tt>. Each filename's extension triggers an
|
42
42
|
optional pre-processor:
|
43
43
|
|
44
44
|
.css = raw
|
@@ -90,7 +90,7 @@ dynamically is useful enough that multiple people have thought of implementing i
|
|
90
90
|
The assets.yml file sets some config values and then lists your assets. Don't be shy
|
91
91
|
about listing your assets; it's a good way to get noticed. This sample config
|
92
92
|
file says that in production, foo.js, bar.js, baz.js, and widget.js (which is
|
93
|
-
in app/
|
93
|
+
in app/assets/javascripts/third-party) should be combined into one file,
|
94
94
|
minified, and served by your app as /assets/javascripts/base.js in such a way
|
95
95
|
that it'd be cached. In development, those files would be combined but not minified
|
96
96
|
or cached.
|
@@ -125,7 +125,7 @@ into an asset via ERB, like this:
|
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
128
|
-
Now in app/
|
128
|
+
Now in app/assets/stylesheets/application.css.erb you could do this:
|
129
129
|
|
130
130
|
body {
|
131
131
|
background-color: <%= @background_color %>;
|
@@ -149,7 +149,7 @@ public/stylesheets/fancy_background.png.
|
|
149
149
|
|
150
150
|
With DynamicAssets, you'll put them here instead:
|
151
151
|
|
152
|
-
app/
|
152
|
+
app/assets/stylesheets/thing.css
|
153
153
|
public/stylesheets/thing/fancy_background.png
|
154
154
|
|
155
155
|
and the processor will make sure the embedded URL is turned into a fully
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Robert Davis
|
@@ -112,7 +112,7 @@ dependencies:
|
|
112
112
|
- 0
|
113
113
|
version: "0"
|
114
114
|
requirement: *id006
|
115
|
-
description: Make your Rails 3 app process
|
115
|
+
description: Make your Rails 3 app package and process CSS and JS assets on the fly
|
116
116
|
email: davis@coaster.com
|
117
117
|
executables: []
|
118
118
|
|
@@ -191,7 +191,7 @@ rubyforge_project:
|
|
191
191
|
rubygems_version: 1.3.7
|
192
192
|
signing_key:
|
193
193
|
specification_version: 3
|
194
|
-
summary: Make your Rails 3 app process
|
194
|
+
summary: Make your Rails 3 app package and process CSS and JS assets on the fly
|
195
195
|
test_files:
|
196
196
|
- spec/dummy_rails_app/app/controllers/application_controller.rb
|
197
197
|
- spec/dummy_rails_app/app/helpers/application_helper.rb
|