So I have a project with page and css styles. I put these files in my own directory assets/#{type}/page-specific/, and I'm trying to write a regex rule to tell the precompiler to do this with them.
This works fine on the JS side of the house, but css is more complex.
app/assets/stylesheets/page-specific/something.css.sass
app/assets/stylesheets/page-specific/default.css
app/assets/stylesheets/page-specific/home.css.scss
I worked with this regular expression in a file config/initializers/assets.rb:
Rails.application.config.assets.precompile << /(page-specific\/[^(css)]+.css)/
The problem is that the section [^(css)]does not do what I want, as it will filter out everything that has c or s in it. What I'm really looking for is a way to match the entire string "css" and stop there.
Also, I know that the usual wisdom would be to simply write styles so that you don't need tabular stylesheets in favor of application.css containing all the stylesheets. I agree. However, this is a very large code base, and there is a lot of time to bring this Rails update to home, and there is no time to analyze and refactor such things.
[^\.] , , , jquery.treeview.css.sass. , , - , , , , , , .