Write a really dumb sample compiler.

This commit is contained in:
Alan Johnson
2010-09-05 17:19:35 -04:00
parent b2ae3c62f0
commit 370fd4c165
4 changed files with 39 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
require('./handlebars');
var fs = require('fs');
process.argv.slice(2).forEach(function(val, index, array) {
var parts = val.split("=", 2);
var tmpl = fs.readFileSync(parts[1], 'utf8');
console.log(parts[0] + " = " + Handlebars.compileToString(tmpl).toString());
});