Skip to content
/ jadeify Public
forked from domenic/jadeify

A simple browserify transform for turning .jade files into template functions

License

Notifications You must be signed in to change notification settings

medesk/jadeify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Browserify Transform for Jade

Jadeify lets you use Jade templates with browserify in the simplest way possible:

var template = require("./template.jade");

document.getElementById("my-thing").innerHTML = template({
    localVar: "value",
    anotherOne: "another value"
});

Setup

When creating your browserify bundle, just add this line:

bundle.transform(require("jadeify"));

or if you are a command line cowboy, something along the lines of

browserify -t jadeify entry.js -o bundle.js

Note that this project peer-depends on Jade and each template will do require("jade/runtime"), so everything will just work: there's no need to add any Jade-related stuff to your bundle manually.

So yeah, now requireing any .jade files will give you back a template function. Have fun!

About

A simple browserify transform for turning .jade files into template functions

Resources

License

Stars

Watchers

Forks

Packages

No packages published