namespace :mb do namespace :sass do desc "clear out all Sass generated stylesheets" task :wipe => :merb_env do template_location = Sass::Plugin.options[:template_location] Dir.glob(File.join(template_location, "**", "*.sass")).entries.each do |file| name = file.sub(template_location + "/", "")[0...-5] css = Sass::Plugin.send(:css_filename, name) if File.exists?(css) puts "deleting #{css}" File.delete(css) end end end end end