FYI. I just solved this by having a simple one line configuration, without watchers. The watchers must be screwing things up.
guard 'haml', :input => 'resources/templ/documents', :output => 'resources/public'
Hth
Question
Is guard-haml still in development and use? The last commit seems to have been 5 months ago (not including updates to the README). I'm trying to get a simple input / output configuration working. However, the input directory always gets prefixed to the output location.
Ie "resources/templ/documents/one.haml" gets compiled to "resources/public/resources/templ/documents/one.html". But all I really want is "resources/public/one.html". So for example, this configuration...
guard :haml, input: 'resources/templ/documents/' , output: 'resources/public/' do
watch(%r{resources/templ/documents/.+\.(haml)$})
end
produces the incorrect output.
07:30:28 - INFO - Successfully compiled haml to html!
> [#] # resources/templ/documents/one.haml -> resources/public/resources/templ/documents/one.html
And these configurations produce nothing.
guard :haml do
watch(/^.+(\.html\.haml)$/)
end
guard :haml, input: 'resources/templ/documents/' , output: 'resources/public/' do
watch(/^resources\/templ\/documents\/+(\.html\.haml)$/)
end
group :main do
guard :haml, input: 'resources/templ/documents/' , output: 'resources/public/' do
watch(/^resources\/templ\/documents\/+(\.html\.haml)$/)
end
end
Am I missing a proper configuration? Or is guard-haml (Using guard-haml (1.1.0)) just buggy? Any insights appreciated.
Pas de solution correcte
Autres conseils
FYI. I just solved this by having a simple one line configuration, without watchers. The watchers must be screwing things up.
guard 'haml', :input => 'resources/templ/documents', :output => 'resources/public'
Hth