2006-12-25 00:22:32 +00:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
# The command line Sass parser.
|
|
|
|
|
|
|
|
if ARGV[0] == "--help" or ARGV[0] == "-h" or ARGV[0] == "-?"
|
|
|
|
puts <<END
|
|
|
|
Usage: sass (template file) (output file)
|
|
|
|
|
|
|
|
Description:
|
|
|
|
Uses the Sass engine to parse the specified template
|
|
|
|
and outputs the result to the specified file.
|
|
|
|
END
|
|
|
|
else
|
|
|
|
require File.dirname(__FILE__) + '/../lib/sass'
|
|
|
|
|
|
|
|
template = File.read(ARGV[0])
|
2006-12-27 19:14:54 +00:00
|
|
|
result = Sass::Engine.new(template).render
|
2006-12-25 00:22:32 +00:00
|
|
|
File.open(ARGV[1], "w") { |f| f.write(result) }
|
|
|
|
end
|