1.1.8 • Published 7 years ago

jade-async v1.1.8

Weekly downloads
37
License
MIT
Repository
github
Last release
7 years ago

jade-async

This is work in progress. Even so, it passes much of original jade tests.

Usage

template.jade

doctype html
html
	head
		title jade-async
	body
		h1= getGreeting('world')
		ul
			each item in getItems()
				li= item

test.js

var jade = require('jade-async');
var vow = require('vow');

var tpl = jade.compileFile('template.jade');
var data = {
	getGreeting: function(username) {
		return vow.delay('Hello, ' + username + '!', 500);
	},
	getItems: function () {
		return [
			vow.delay('item1', 500),
			vow.delay('item2', 750),
			vow.delay('item3', 1000)
		];
	}
};
// promises
tpl(data).done(function (html) {
	console.log(html);
});
// streaming
tpl(data, process.stdout);
1.1.8

7 years ago

1.1.7

10 years ago

1.1.6

10 years ago

1.1.5

10 years ago

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago