Created
January 13, 2012 22:35
-
-
Save jdlich/1609140 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
# | |
# Rake is a ruby build tool similar to ant. See: | |
# http://rake.rubyforge.org/files/doc/rational_rdoc.html | |
# | |
# If you have Ruby installed, you have Rake. | |
# | |
# Run `rake -T` to see list of available tasks (this is the ant equivalent of `ant -p`). | |
# | |
begin | |
require 'sass' | |
rescue LoadError | |
puts "You need to install sass! See sass-lang.com for more information about sass." | |
end | |
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 | |
File.open("css/portal.css", "w+") { |f| f.write(css) } | |
puts "Compiled css/portal.css" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment