Skip to content

Instantly share code, notes, and snippets.

@djalmaaraujo
Created October 1, 2012 21:17
Show Gist options
  • Save djalmaaraujo/3814479 to your computer and use it in GitHub Desktop.
Save djalmaaraujo/3814479 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sass'
files = Dir.glob($project.getProperty('scss'))
files.each do | file |
puts '[SCSS] Compiling ' + File.basename(file, ".*") + '.css'
content = File.read(file)
engine = Sass::Engine.new(content, :syntax => :scss, :style => :compressed)
sass_output = engine.render
aFile = File.new(File.join($project.getProperty('scss.build'), File.basename(file, ".*")) + '.css', 'w')
aFile.write(sass_output)
aFile.close
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment