Sha256: 51ea00055473edfdedee053d6643cdd5b3aeec0280476038c55f01a7176f5aed

Contents?: true

Size: 503 Bytes

Versions: 11

Compression:

Stored size: 503 Bytes

Contents

#!/usr/bin/env ruby
# The command line Haml parser.

if ARGV[0] == "--help" or ARGV[0] == "-h" or ARGV[0] == "-?"
  puts <<END
Usage: haml (template file) (output file)

Description:
  Uses the Haml engine to parse the specified template
  and outputs the result to the specified file.
END
else
  require File.join(File.dirname(__FILE__), '..', 'lib', 'haml', 'engine')

  template = File.read(ARGV[0])
  result = Haml::Engine.new(template).to_html
  File.open(ARGV[1], "w") { |f| f.write(result) }
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
haml-1.0.2 bin/haml
haml-1.0.4 bin/haml
haml-1.0.0 bin/haml
haml-1.0.5 bin/haml
haml-1.0.3 bin/haml
haml-1.0.1 bin/haml
typo-4.1.1 vendor/plugins/haml/bin/haml
typo-5.0.1 vendor/plugins/haml/bin/haml
typo-5.0.2 vendor/plugins/haml/bin/haml
typo-4.1 vendor/plugins/haml/bin/haml
typo-5.0 vendor/plugins/haml/bin/haml