How to watch for changes to HAML files and save them
I want to run a HAML command every time I save a particular file. I know this can be d开发者_C百科one by compass but only for sass not HAML has anyone done this or guide me how to.
On MacOS (and I assume, on linux too) you can use the 'watch' command from the terminal.
First, you need to install it using, for example "homebrew"
brew install watch
and then you can run it like:
watch haml haml/mypage.html.haml html/mypage.html
Or if anyone stumbled in here like I did. There is a newer tool: LiveReload that does all these automatically and more.
Sure, check out StaticMatic, nanoc, or Webby (search for these on gitHub). You can make them work with Compass too.
精彩评论