Skip to content

Instantly share code, notes, and snippets.

@jdlich
Created January 13, 2012 22:35
Show Gist options
  • Save jdlich/1609140 to your computer and use it in GitHub Desktop.
Save jdlich/1609140 to your computer and use it in GitHub Desktop.
#
# 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