1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-28 15:08:46 +00:00
TiddlyWiki5/cook.js
Jeremy Ruston 5314fda2ca Converted recipe handling to use async IO
Part of the preparation for supporting reading recipes and ingredients
over HTTP
2011-11-28 13:47:38 +00:00

17 lines
382 B
JavaScript

// Cook a TiddlyWiki recipe and send it to STDOUT
//
// Usage: node cook.js <recipefile>
var sys = require("sys"),
TiddlyWiki = require("./js/TiddlyWiki.js").TiddlyWiki,
Recipe = require("./js/Recipe.js").Recipe;
var filename = process.argv[2];
var store = new TiddlyWiki();
var theRecipe = new Recipe(store,filename,function() {
process.stdout.write(theRecipe.cook());
});