Skip to content

Instantly share code, notes, and snippets.

@micahasmith
Created December 23, 2011 21:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micahasmith/1515402 to your computer and use it in GitHub Desktop.
Save micahasmith/1515402 to your computer and use it in GitHub Desktop.
hogan.js express.js view engine adapter
var HoganExpressAdapter=(function(){
var init=function(hogan) {
var compile=function(source){
return function(options) {
return hogan.compile(source).render(options);
};
}
return {compile:compile};
};
return {init:init};
}());
if(typeof module!== 'undefined' && module.exports){
module.exports=HoganExpressAdapter;
} else if (typeof exports!=='undefined') {
exports.HoganExpressAdapter=HoganExpressAdapter;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment