do clean the assets
This commit is contained in:
parent
6bc9ef43c9
commit
447dc60ede
@ -36,6 +36,13 @@ module Guard
|
|||||||
@@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
|
||||||
@ -73,6 +80,7 @@ module Guard
|
|||||||
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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
module Guard
|
module Guard
|
||||||
module RailsAssetsVersion
|
module RailsAssetsVersion
|
||||||
VERSION = "0.1.0"
|
VERSION = "0.1.1"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user