Sha256: f83a8c6573e75006067693fef4179e7f286bf860822b490ecc2941017c71e0d2
Contents?: true
Size: 594 Bytes
Versions: 3
Compression:
Stored size: 594 Bytes
Contents
module Rake module DSL def haml_template(tmpl, options) extras = '' lib_dir = options[:lib] if lib_dir libraries = Dir["#{lib_dir}/*.rb"].collect { |l| File.basename(l, '*.rb') } extras << "-I#{lib_dir} " extras << libraries.collect { |l| "-r#{l}" }.join(' ') end File.join(options[:output], File.basename(tmpl)).ext('html').tap do |html_file| directory options[:output] file html_file => [options[:output], tmpl] do sh "haml -t ugly #{extras} #{tmpl} #{html_file}" end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ggake-0.9.0 | lib/ggake/haml.rb |
ggake-0.8.0 | lib/ggake/haml.rb |
ggake-0.7.0 | lib/ggake/haml.rb |