Skip to content

Commit

Permalink
do clean the assets
Browse files Browse the repository at this point in the history
  • Loading branch information
dnagir committed Oct 10, 2011
1 parent 6bc9ef4 commit 447dc60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/guard/rails-assets/rails_runner.rb
Expand Up @@ -36,6 +36,13 @@ def self.boot_rails
@@rails_booted = true @@rails_booted = true
end end


def clean
Rake::Task["tmp:cache:clear"].execute
# copy from the "assets:clean" Rake task
config = ::Rails.application.config
public_asset_path = File.join(Rails.public_path, config.assets.prefix)
rm_rf public_asset_path, :secure => true
end


def precompile def precompile
config = Rails.application.config config = Rails.application.config
Expand Down Expand Up @@ -73,6 +80,7 @@ def compile_assets
self.class.boot_rails self.class.boot_rails
return false unless @@rails_booted return false unless @@rails_booted
begin begin
clean
precompile precompile
true true
rescue => e rescue => e
Expand Down
2 changes: 1 addition & 1 deletion lib/guard/version.rb
@@ -1,5 +1,5 @@
module Guard module Guard
module RailsAssetsVersion module RailsAssetsVersion
VERSION = "0.1.0" VERSION = "0.1.1"
end end
end end

0 comments on commit 447dc60

Please sign in to comment.