Created
July 16, 2014 09:45
-
-
Save KELiON/f400d747008e351b636d to your computer and use it in GitHub Desktop.
Compile all assets from roots
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Precompile all JS/CSS in root of app/assets/stylesheets and app/assets/javascripts | |
config.assets.precompile += | |
Dir[::Rails.root.join('app/assets/*/*.{js,css,coffee,sass,scss}*')]. | |
map { |i| File.basename(i).sub(/(\.js)?\.coffee$/, '.js') }. | |
map { |i| File.basename(i).sub(/(\.css)?\.(sass|scss)$/, '.css') }. | |
reject { |i| i =~ /^application\.(js|css)$/ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment