Skip to content

Instantly share code, notes, and snippets.

@ylansegal
Forked from fantactuka/gist:1887133
Created December 12, 2012 22:59
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 ylansegal/4272448 to your computer and use it in GitHub Desktop.
Save ylansegal/4272448 to your computer and use it in GitHub Desktop.
Sass compilation -> Programatically
require "sass"
require "compass"
def compile_sass(sass_file)
sass_dir = File.dirname(sass_file)
compass_dir = File.join(Compass.base_directory, "frameworks/compass/stylesheets")
css_dir = File.join(File.dirname(__FILE__), 'css')
Sass.compile(File.read(sass_file), :syntax => :scss, :load_paths => [sass_dir, compass_dir, css_dir])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment