-
-
Save n-at/22000f1d920aa2ff4f0a to your computer and use it in GitHub Desktop.
twig node renderer
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 twig = require('twig').twig; | |
twig({ | |
path: 'tpl.twig', | |
load: function(tpl) { | |
console.log(tpl.render({text: 'Hello, world'})); | |
}, | |
error: function(err) { | |
console.log(':('); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment