Skip to content

Instantly share code, notes, and snippets.

@jdlich
Created February 28, 2012 21:55
Show Gist options
  • Save jdlich/1935506 to your computer and use it in GitHub Desktop.
Save jdlich/1935506 to your computer and use it in GitHub Desktop.
#
# 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