2013-11-04 06:58:34 +08:00
|
|
|
|
2013-12-19 09:33:17 +08:00
|
|
|
task 'assets:precompile:before' do
|
2013-11-04 06:58:34 +08:00
|
|
|
|
2013-12-19 09:33:17 +08:00
|
|
|
unless %w{profile production}.include? Rails.env
|
|
|
|
raise "rake assets:precompile should only be run in RAILS_ENV=production, you are risking unminified assets"
|
2013-11-04 06:58:34 +08:00
|
|
|
end
|
2013-12-19 09:33:17 +08:00
|
|
|
|
|
|
|
# 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
|
2013-11-04 06:58:34 +08:00
|
|
|
end
|
2013-12-19 09:33:17 +08:00
|
|
|
|
|
|
|
task 'assets:precompile' => 'assets:precompile:before'
|
|
|
|
|