process haml files in the examples correctly.
This commit is contained in:
parent
8280e6aaf1
commit
0c6d1f967d
4
Rakefile
4
Rakefile
@ -58,7 +58,7 @@ task :examples do
|
|||||||
engine = Haml::Engine.new(open(haml_file).read, :filename => haml_file)
|
engine = Haml::Engine.new(open(haml_file).read, :filename => haml_file)
|
||||||
target_dir = "built_examples/#{basename.sub(%r{/[^/]*$},'')}"
|
target_dir = "built_examples/#{basename.sub(%r{/[^/]*$},'')}"
|
||||||
FileUtils.mkdir_p(target_dir)
|
FileUtils.mkdir_p(target_dir)
|
||||||
output = open("built_examples/#{basename}",'w')
|
output = open("built_examples/#{basename}.html",'w')
|
||||||
output.write(engine.render)
|
output.write(engine.render)
|
||||||
output.close
|
output.close
|
||||||
end
|
end
|
||||||
@ -81,7 +81,7 @@ task :examples do
|
|||||||
# copy any other non-haml and non-sass files directly over
|
# copy any other non-haml and non-sass files directly over
|
||||||
target_dir = "built_examples/#{example.sub(%r{.*/},'')}"
|
target_dir = "built_examples/#{example.sub(%r{.*/},'')}"
|
||||||
other_files = FileList["#{example}/**/*"]
|
other_files = FileList["#{example}/**/*"]
|
||||||
other_files.exclude "**/*.sass", "*.haml"
|
other_files.exclude "**/*.sass", "**/*.haml"
|
||||||
other_files.each do |file|
|
other_files.each do |file|
|
||||||
|
|
||||||
if File.directory?(file)
|
if File.directory?(file)
|
||||||
|
Loading…
Reference in New Issue
Block a user