-
-
Save jimmyhchan/8309666 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//whitespaces added for clarification | |
module.exports = (function(){ | |
dust.register("intro",body_0); | |
function body_0(chk,ctx){ | |
return chk.write("Hello ").reference(ctx._get(false, ["name"]),ctx,"h").write("!"); | |
} | |
return body_0; | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dust = require('dustjs-linkedin'); | |
var templateName = 'intro'; | |
// this adds intro to dust.cache | |
require('./' + templateName); | |
dust.render('intro', {name:'fooooo'}, function(error, result) { | |
console.log(result); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment