Skip to content

Instantly share code, notes, and snippets.

@jdlich
Created January 12, 2012 20:47
Show Gist options
  • Save jdlich/1603001 to your computer and use it in GitHub Desktop.
Save jdlich/1603001 to your computer and use it in GitHub Desktop.
require 'paint'
namespace :sass do
desc "Compile sass."
task :compile do
options = {
:style => :expanded,
:cache => false,
:syntax => :scss,
:load_paths => ['.','./scss']
}
scss = File.read("scss/portal.scss")
css = Sass::Engine.new(scss, options).render
compiled_css = "path/to/compiled.css"
File.open(compiled, "w+") { |f| f.write(css) }
puts Paint["Compiled", :green] + compiled_css
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment