Skip to content

Instantly share code, notes, and snippets.

@baudehlo
Created August 11, 2014 13:23
Show Gist options
  • Save baudehlo/9dd4567d95982cbe2d46 to your computer and use it in GitHub Desktop.
Save baudehlo/9dd4567d95982cbe2d46 to your computer and use it in GitHub Desktop.
var render = exports.render = function (name, data, cb) {
// console.log("Rendering " + name + ".jade");
jade.renderFile(__dirname + '/../views/emails/' + name + '.jade', data, function (err, template_output) {
if (err) return cb(err);
if (juice) return juice.juiceContent(template_output, juice_options, cb);
return cb(null, template_output);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment