Skip to content

Instantly share code, notes, and snippets.

@vybs
Created December 19, 2011 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vybs/1495270 to your computer and use it in GitHub Desktop.
Save vybs/1495270 to your computer and use it in GitHub Desktop.
compass compiler code in ruby that can be invoked from an ant task as well
require 'rubygems'
require 'sass'
require 'compass'
require 'compass/exec'
class COMPASS_COMPILER
def self.compileme(filename, locale)
$LOAD_PATH.unshift "#{filename}.scss"
scss_src_dir = File.dirname(filename)
options = { :cache_location => "cache", :style => :compressed, :full_exception => :true, :syntax => :scss }
compass_compiler = Compass::Compiler.new(scss_src_dir, "sass", "css", options)
compass_compiler.compile("#{filename}.scss", "#{filename}.css");
end
end
COMPASS_COMPILER.compileme("test","en_US")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment