rlivsey (owner)

Revisions

gist: 134167 Download_button fork
public
Description:
Rake task to wipe CSS files generated by SASS
Public Clone URL: git://gist.github.com/134167.git
Embed All Files: show embed
Rake task to wipe CSS files generated by SASS #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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