0.1.2 • Published 10 years ago

jade-namespace v0.1.2

Weekly downloads
1
License
Apache v2
Repository
github
Last release
10 years ago

jade-namespace

A generator of javascript web-friendly files from jade templates

Usage:

Running the command: ./bin/jade-namespace test.jade

Generates a javascript with the compiled javascript function within a namespace.

For example, if we have a jade file named tests/test.jade containing the following:

h1 Hi

It becomes a javascript with this content:

window.jade = window.jade || {};
window.jade['tests/test'] = function(locals) {
    var buf = [];
    var jade_mixins = {};
    var jade_interp;

    buf.push("<h1>Hi</h1>");;return buf.join("");
};

Then, in the client side, you can render the html with

jade['tests/test'](locals);
0.3.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago