Compiles Jade templates for hem.
It is currently usable only with this patch.
-
Install it with
npm install hem-compiler-jade
(and add it to thepackage.json
if using one). -
Add
"node_modules/hem-compiler-jade/node_modules/jade/runtime.js"
(or simply"node_modules/jade/runtime.js"
if jade is in yourpackage.json
) to thelibs
section of yourslug.json
. -
Add
"jade": "hem-compiler-jade"
to thecompilers
section of yourslug.json
. -
...
-
PROFIT!
Now all the .jade
files are transparently compiled to js and can be
required like normal modules exposing the only function -- the compiled
template -- which takes context and returns resulting html.
For example, we have my-template.jade
file:
tmpl = require('my-template')
html = tmpl({/*context aka locals*/})
...