-
-
Save Mayurifag/a0facb86be3bb68b605c7829abf34bd8 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