From 8203437a4ff8bb170f92e1a45f4e919740c43ced Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 5 May 2012 11:24:45 +0100 Subject: [PATCH] Starting to implement cooking down the rabbithole The idea is that rendering tiddlywiki5.template.html to text/plain will cook the TiddlyWiki HTML file --- rabbithole/core/modules/macros/serialize.js | 23 +++++++++++++++++++ ...ate.html => tiddlywiki5.template.html.tid} | 5 +++- rabbithole/tiddlywiki5.recipe | 2 +- rabbithole/tw5.com/run.sh | 4 +++- 4 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 rabbithole/core/modules/macros/serialize.js rename rabbithole/core/{tiddlywiki5.template.html => tiddlywiki5.template.html.tid} (92%) diff --git a/rabbithole/core/modules/macros/serialize.js b/rabbithole/core/modules/macros/serialize.js new file mode 100644 index 000000000..4633d5e78 --- /dev/null +++ b/rabbithole/core/modules/macros/serialize.js @@ -0,0 +1,23 @@ +/*\ +title: $:/core/modules/macros/serialize.js +type: application/javascript +module-type: macro + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.info = { + name: "serialize", + params: {} +}; + +exports.executeMacro = function() { + return []; +}; + + +})(); diff --git a/rabbithole/core/tiddlywiki5.template.html b/rabbithole/core/tiddlywiki5.template.html.tid similarity index 92% rename from rabbithole/core/tiddlywiki5.template.html rename to rabbithole/core/tiddlywiki5.template.html.tid index fc944da7f..c71dbadec 100644 --- a/rabbithole/core/tiddlywiki5.template.html +++ b/rabbithole/core/tiddlywiki5.template.html.tid @@ -1,3 +1,6 @@ +title: $:/core/tiddlywiki5.template.html +type: text/x-tiddlywiki-html + < -[[$:/shadows/title]] +<<tiddler target:$:/shadows/title>> diff --git a/rabbithole/tiddlywiki5.recipe b/rabbithole/tiddlywiki5.recipe index 1482be9a5..e83a5da7a 100644 --- a/rabbithole/tiddlywiki5.recipe +++ b/rabbithole/tiddlywiki5.recipe @@ -5,7 +5,7 @@ version: core/version.txt jsbootstart: core/bootprefix.js jsbootend: core/boot.js -shadow: core/tiddlywiki5.template.html +shadow: core/tiddlywiki5.template.html.tid title: $:/core/tiddlywiki5.template.html shadow: core/copyright.txt title: $:/core/copyright.txt diff --git a/rabbithole/tw5.com/run.sh b/rabbithole/tw5.com/run.sh index bd08dca3d..e4fe6fafc 100755 --- a/rabbithole/tw5.com/run.sh +++ b/rabbithole/tw5.com/run.sh @@ -2,7 +2,9 @@ # run TiddlyWiki5 -node ../core/boot.js --verbose --wikitest ../../test/wikitests/ --dump shadows || exit 1 +node ../core/boot.js --verbose --wikitest ../../test/wikitests/ || exit 1 + +node ../core/boot.js --verbose --savetiddler $:/core/tiddlywiki5.template.html ../tmp/tw5/rabbit.html text/plain || exit 1 # run jshint jshint ../core/*.js