Created
January 12, 2012 20:47
-
-
Save jdlich/1603001 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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