add digest option to CLI runner
This commit is contained in:
parent
039f3b4fc0
commit
6bc9ef43c9
@ -2,10 +2,14 @@ module Guard
|
|||||||
class RailsAssets::CliRunner
|
class RailsAssets::CliRunner
|
||||||
def initialize(options={})
|
def initialize(options={})
|
||||||
@rails_env = (options[:rails_env] || 'test').to_s
|
@rails_env = (options[:rails_env] || 'test').to_s
|
||||||
|
@digest = options[:digest]
|
||||||
|
@digest = true if @digest.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
def compile_assets
|
def compile_assets
|
||||||
system "RAILS_ENV=#{@rails_env} bundle exec rake assets:clean assets:precompile"
|
task = "assets:precompile"
|
||||||
|
task += ":nondigest" unless @digest
|
||||||
|
system "RAILS_ENV=#{@rails_env} bundle exec rake assets:clean #{task}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user