mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
18 lines
477 B
Ruby
Executable file
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
|