aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Bolton King <guy@waftex.com>2012-03-02 16:02:09 +0000
committerGuy Bolton King <guy@waftex.com>2012-03-02 16:02:09 +0000
commitcf65057c65bd7e140b0b816e1f691e1afaf4a157 (patch)
treeb3fb40b0ba7b0bd0fd25690cc158d60a92c48785
parent1adad4442b29da3585713cc365d732fd953f8fac (diff)
downloadrails-cf65057c65bd7e140b0b816e1f691e1afaf4a157.tar.gz
rails-cf65057c65bd7e140b0b816e1f691e1afaf4a157.tar.bz2
rails-cf65057c65bd7e140b0b816e1f691e1afaf4a157.zip
Made documentation of config.assets.precompile slightly more explicit.
Having read the previous version of the documentation, I was surprised when a wildcarded CSS pattern in precompile picked up a whole load of SCSS files! I've amended lines 426 onwards to document the behaviour.
-rw-r--r--railties/guides/source/asset_pipeline.textile4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index bec1fc909e..9ba2e235bc 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -423,12 +423,14 @@ It is important that this folder is shared between deployments so that remotely
NOTE. If you are precompiling your assets locally, you can use +bundle install --without assets+ on the server to avoid installing the assets gems (the gems in the assets group in the Gemfile).
-The default matcher for compiling files includes +application.js+, +application.css+ and all non-JS/CSS files (i.e., +.coffee+ and +.scss+ files are *not* automatically included as they compile to JS/CSS):
+The default matcher for compiling files includes +application.js+, +application.css+ and all non-JS/CSS files (this will include all image assets automatically):
<ruby>
[ Proc.new{ |path| !File.extname(path).in?(['.js', '.css']) }, /application.(css|js)$/ ]
</ruby>
+NB: the matcher (and other members of the precompile array; see below) is applied to the final compiled file name. This means that anything that compiles to JS/CSS is excluded, as well as raw JS/CSS files; for example, +.coffee+ and +.scss+ files are *not* automatically included as they compile to JS/CSS.
+
If you have other manifests or individual stylesheets and JavaScript files to include, you can add them to the +precompile+ array:
<erb>