1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

refectored assets:clean task

This commit is contained in:
Vishnu Atrai 2011-05-30 11:26:11 +05:30
parent 008a0ecdb1
commit f4a2b9ee85

View file

@ -1,5 +1,3 @@
require "fileutils"
namespace :assets do
desc "Compile all the assets named in config.assets.precompile"
task :precompile => :environment do
@ -15,6 +13,6 @@ namespace :assets do
assets = Rails.application.config.assets
public_asset_path = Rails.public_path + assets.prefix
file_list = FileList.new("#{public_asset_path}/*.js", "#{public_asset_path}/*.css")
file_list.each{ |list| FileUtils.rm list }
file_list.each{ |file| rm file }
end
end