I wish to precompile all the CSS and JS files in my project\'s app/assets folder. I do NOT want to precompile everything in vendor/assets or lib/assets, only th
I found this in the rails code:
@assets.precompile = [ Proc.new{ |path| !File.extname(path).in?(['.js', '.css']) },
/(?:\/|\\|\A)application\.(css|js)$/ ]
Which is backed up with the rails guide:
The default matcher for compiling files includes application.js, application.css and all non-JS/CSS files
This default is not reset if you use +=, so you need to override it with a = instead of +=. Note that, apparently, you can pass a Proc or a regex to precompile as well as an extension. I believe, if you want to preompile only files in the top level directory, you will have to create a regex like:
config.assets.precompile = [ /\A[^\/\\]+\.(ccs|js)$/i ]