wind-parser

Watch a folder for *.wind.html file changes and generate *.html files

npm install wind-parser
5 downloads in the last week
25 downloads in the last month

Wind

Watch a directory for .wind.html file changes and auto generate .html files.

npm install wind-parser

Then set it to watch a directory:

cd directory-with-wind-files
windsock -v

Templates

Templates are just html files with basic {{ variable }} style variables in them.

<html>
  <head>
    <title>{{ title }}</title>
  </head>
  <body>
    <p>{{ message }}</p>
  </body>
</html>

Defining Variables

Wind will check for a file called locals.json in the watched directory to load for local variables that can be used in the templates.

Variables are found inside double curlies (eg. {{ variable_name }}).

Using Layouts

If the watcher finds a file called layout.wind.html it will use it as a wrapper for any other files in the directory. Each non-layout template will be injected into the view wherever a {{ yield }} is found.

npm loves you