1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00
haml--haml/bin/sass
nex3 1996bd55d1 Making the sass executable work.
git-svn-id: svn://hamptoncatlin.com/haml/trunk@270 7063305b-7217-0410-af8c-cdc13e5119b9
2006-12-27 19:14:54 +00:00

18 lines
477 B
Ruby
Executable file

#!/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])
result = Sass::Engine.new(template).render
File.open(ARGV[1], "w") { |f| f.write(result) }
end