Skip to content
NPM for watching a directory for haml files and generating html files.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
README.md
index.js
package.json
watcher.js

README.md

Hamlet

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

npm install hamlet-js

Then set it to watch a directory:

cd directory-with-haml-files
hamlet -v

Handling Layouts

If the watcher finds a file called layout.haml 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.

Defining Variables

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

Something went wrong with that request. Please try again.