Created
February 10, 2011 02:56
-
-
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.
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
| #!/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) |
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
| 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