desc "Compiles all .less files in app/stylesheets directory into the public/stylesheets directory of a Rails application"
task :less do
require 'less'
less_files = 'app/stylesheets/'
destination = 'public/stylesheets/'
stylesheets = Dir.entries(less_files)
stylesheets.select{|s| File.extname(s) == ".less"}.each do |sheet|
f = File.new("#{destination}#{File.basename(sheet, ".less")}.css", File::CREAT|File::TRUNC|File::RDWR, 0644)
f.write Less::Engine.new(File.new(less_files + sheet)).to_css
end
end
Among other things, A "when I find em" journal of the dead animals i see on the road and in the ditch. I now intend to make this my defacto blog, rather than a theme blog. So expect a variety of topics (including the occasional dead animal picture). Heh, yeah, when I get around to posting.
No comments:
Post a Comment