Skip to content

Instantly share code, notes, and snippets.

@chriseppstein
Created February 10, 2011 02:56
Show Gist options
  • Select an option

  • Save chriseppstein/819832 to your computer and use it in GitHub Desktop.

Select an option

Save chriseppstein/819832 to your computer and use it in GitHub Desktop.
Evaluate sass script from standard input and print out the result to standard output.
#!/usr/bin/env ruby
# Make sure to chmod +x this file.
require 'rubygems'
require 'sass'
puts Sass::Script::Parser.parse($stdin.read, 0, 0).perform(Sass::Environment.new)
echo "hue(#f0c)" | ./sass_eval.rb
#=> 312deg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment