Haml has been supported in merb for a long time, longer than I've been involved with merb for sure. Sass was lacking though... Until Now :)
Before you can use Sass in Merb, you'll probably need to get the latest Haml.
sudo gem install hamlTo use Sass in your Merb App it works the same way as in Rails. Put your Sass templates into public/stylesheets/sass
public/stylesheets/sass/my_style_sheet.sassand include the css in the head of your layout application.html.*
css_include_tag :my_style_sheetThe only thing left to do now is to declare the dependency. In
config/dependencies.rbinclude the line
dependency "haml"Your app will now happily use your Sass templates, updated when you change them in development, but compiled only once during production. Sweet :)
1 comments:
If only I hadn't of been lazy, There would of been a different version in earlier :P
Post a Comment