node package manager


Hamlet CLI

Command line interface for processing files with Hamlet over stdio.


Haml in, JavaScript templates out.

hamlet < template.haml > output.js

echo "%h1#title= @title" | hamlet


--runtime, -r [runtime_name] Specifies the name of the globally available Hamlet runtime (default is 'require("hamlet-runtime")'). This is so the templates can be used with browserify on node.js or used manully in the browser.

hamlet -r "Hamlet" < template.haml > output.js

-a, --ast If given the compiler outputs the AST as JSON rather than a JavaScript template.