Rake task 'clean' deletes each file inside of specified cache directories and generated stylesheets

This commit is contained in:
Brandon Mathis 2012-05-22 19:21:29 -05:00
parent 91e26fe430
commit 934e3b3040

View File

@ -189,7 +189,8 @@ end
desc "Clean out caches: .pygments-cache, .gist-cache, .sass-cache"
task :clean do
rm_rf [".pygments-cache/**", ".gist-cache/**", ".sass-cache/**", "source/stylesheets/screen.css"]
[".pygments-cache/**", ".gist-cache/**", ".sass-cache/**"].each { |dir| rm_rf Dir.glob(dir) }
rm "source/stylesheets/screen.css"
puts "## Cleaned Sass, Pygments and Gist caches, removed generated stylesheets ##"
end