A simple templating engine for HTML – Inspired by Sass.
Install the gem
gem install wavy
When your config and templates are ready, run
wavy [config] [output_dir]
For detailed information, view the reference documentation.
_config.wavy
@import "mixins"
@export "view.html.wavy"
_mixins.wavy
@mixin button($label, $class) {
<div class="button {$class}">
@include v-align({$label})
</div>
}
@mixin v-align($content) {
<div class="v-align">
{$content}
</div>
}
view.html.wavy
<div class="main">
<div class="container">
@include button({{label}}, gray)
</div>
</div>
wavy [config] [output_dir]
wavy config.wavy ./build
view.html
<div class="main">
<div class="container">
<div class="button gray">
<div class="v-align">
{{label}}
</div>
</div>
</div>
</div>
Matthew Govaere (@matthewgovaere) created Wavy out of the need for a simple method to reuse chunks of code for HTML templates.