15 lines
459 B
Ruby
15 lines
459 B
Ruby
|
|
task 'assets:precompile:before' do
|
|
|
|
unless %w{profile production}.include? Rails.env
|
|
raise "rake assets:precompile should only be run in RAILS_ENV=production, you are risking unminified assets"
|
|
end
|
|
|
|
# in the past we applied a patch that removed asset postfixes, but it is terrible practice
|
|
# leaving very complicated build issues
|
|
# https://github.com/rails/sprockets-rails/issues/49
|
|
end
|
|
|
|
task 'assets:precompile' => 'assets:precompile:before'
|
|
|