2011-11-22 14:29:29 +00:00
|
|
|
// Cook a TiddlyWiki recipe and send it to STDOUT
|
|
|
|
//
|
|
|
|
// Usage: node cook.js <recipefile>
|
|
|
|
|
2011-12-01 10:30:17 +00:00
|
|
|
/*global require: false, exports: false */
|
2011-11-30 17:27:00 +00:00
|
|
|
"use strict";
|
|
|
|
|
2011-11-29 18:27:26 +00:00
|
|
|
var TiddlyWiki = require("./js/TiddlyWiki.js").TiddlyWiki,
|
2011-11-30 16:06:34 +00:00
|
|
|
Recipe = require("./js/Recipe.js").Recipe,
|
|
|
|
util = require("util");
|
2011-11-22 14:29:29 +00:00
|
|
|
|
|
|
|
var filename = process.argv[2];
|
|
|
|
|
2011-11-27 09:46:02 +00:00
|
|
|
var store = new TiddlyWiki();
|
2011-11-22 14:29:29 +00:00
|
|
|
|
2011-11-28 13:47:38 +00:00
|
|
|
var theRecipe = new Recipe(store,filename,function() {
|
|
|
|
process.stdout.write(theRecipe.cook());
|
|
|
|
});
|