Skip to content

Commit

Permalink
Check assets:clobber is defined before enhancing (#71)
Browse files Browse the repository at this point in the history
rails/cssbundling-rails@a749ca2 suggests that "Sprockets is not a dependency", so we should not
assume that the assets:precompile AND assets:clobber tasks will be defined. If it's not
there, we should just skip enhancing it.

Related to: rails/cssbundling-rails#59
  • Loading branch information
HLFH authored Jan 28, 2022
1 parent 9bcb72d commit 082c638
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tasks/cssbundling/clobber.rake
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ namespace :css do
end
end

Rake::Task["assets:clobber"].enhance(["css:clobber"])
if Rake::Task.task_defined?("assets:clobber")
Rake::Task["assets:clobber"].enhance(["css:clobber"])
end

0 comments on commit 082c638

Please sign in to comment.