rename task and Rake::FileList used
This commit is contained in:
parent
9d10c2a03d
commit
008a0ecdb1
@ -11,10 +11,10 @@ namespace :assets do
|
||||
end
|
||||
|
||||
desc "Remove compiled assets"
|
||||
task :cleanup => :environment do
|
||||
task :clean => :environment do
|
||||
assets = Rails.application.config.assets
|
||||
public_asset_path = Rails.public_path + assets.prefix
|
||||
FileUtils.rm_r Dir.glob("#{public_asset_path}/*.js")
|
||||
FileUtils.rm_r Dir.glob("#{public_asset_path}/*.css")
|
||||
file_list = FileList.new("#{public_asset_path}/*.js", "#{public_asset_path}/*.css")
|
||||
file_list.each{ |list| FileUtils.rm list }
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user