hem-compiler-jade
v0.1.3
Published
jade support for hem
Downloads
10
Readme
Jade compiler for hem
Compiles Jade templates for hem.
Usage
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
"hem-compiler-jade/node_modules/jade/lib/runtime"
to thedependencies
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*/})
...