Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

nl0/hem-compiler-jade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jade compiler for hem

Compiles Jade templates for hem.

Usage

It is currently usable only with this patch.

  1. Install it with npm install hem-compiler-jade (and add it to the package.json if using one).

  2. Add "node_modules/hem-compiler-jade/node_modules/jade/runtime.js" (or simply "node_modules/jade/runtime.js" if jade is in your package.json) to the libs section of your slug.json.

  3. Add "jade": "hem-compiler-jade" to the compilers section of your slug.json.

  4. ...

  5. 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*/})
...

About

Jade compiler for hem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published