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.jsonif 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 thelibssection of yourslug.json. -
Add
"jade": "hem-compiler-jade"to thecompilerssection 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*/})
...