Skip to content

matthewgovaere/wavy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

~ Wavy

Gem Version

A simple templating engine for HTML – Inspired by Sass.

Usage

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.

Example

Main

_config.wavy

@import "mixins"

@export "view.html.wavy"

Mixins

_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>
}

Template

view.html.wavy

<div class="main">
  <div class="container">
  
    @include button({{label}}, gray)
    
  </div>
</div>

Compile

wavy [config] [output_dir]

wavy config.wavy ./build

Output

view.html

<div class="main">
  <div class="container">
  
    <div class="button gray">
      <div class="v-align">
        {{label}}
      </div>
    </div>
    
  </div>
</div>

Authors

Matthew Govaere (@matthewgovaere) created Wavy out of the need for a simple method to reuse chunks of code for HTML templates.

About

A simple templating engine for HTML – Inspired by Sass.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages