Created
December 19, 2011 03:37
-
-
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
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
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