Create a gist now

Instantly share code, notes, and snippets.

@balupton /README.md
Last active Dec 15, 2015

What would you like to do?
Blog: Inline Pre-Processors

Inline Pre-Processors

How long until we can do this?

/* coffee
multiply = (x,y,next) -> next(null,x*y)
*/

multiply(2,5,function(err,result){
	if(err) throw err;
	alert(result);  // 10
});

Actually, turns out with DocPad and the DocPad Text Plugin you can:

<t render="js.coffee">
multiply = (x,y,next) -> next(null,x*y)
</t>

multiply(2,5,function(err,result){
	if(err) throw err;
	alert(result);  // 10
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment