From cf65057c65bd7e140b0b816e1f691e1afaf4a157 Mon Sep 17 00:00:00 2001 From: Guy Bolton King Date: Fri, 2 Mar 2012 16:02:09 +0000 Subject: 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. --- railties/guides/source/asset_pipeline.textile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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): [ Proc.new{ |path| !File.extname(path).in?(['.js', '.css']) }, /application.(css|js)$/ ] +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: -- cgit v1.2.3