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-12-06 18:29:53 +00:00
|
|
|
var WikiStore = require("./js/WikiStore.js").WikiStore,
|
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-12-06 18:29:53 +00:00
|
|
|
var store = new WikiStore();
|
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());
|
|
|
|
});
|