Created
February 28, 2012 21:55
-
-
Save jdlich/1935506 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
# | |
# COMPILING SKIN STYLES | |
# | |
# Run `rake -T` to see a list of available tasks (this is the `ant -p` equivalent). | |
# | |
# Run `rake compile` from within the skin directory to compile CSS. | |
# | |
# ABOUT RAKE | |
# | |
# Rake is a ruby build tool similar to ant. If you | |
# have Ruby installed, you have Rake installed, too. | |
# | |
# http://rake.rubyforge.org/files/doc/rational_rdoc.html | |
# | |
begin | |
require 'sass' | |
rescue LoadError | |
puts "You need to install sass! See sass-lang.com for more information about sass." | |
end | |
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("portal.css", "w+") { |f| f.write(css) } | |
puts "Compiled portal.css" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment