From e9e211e51d4c653cf50808e0b59cf82eef881ab6 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 30 Apr 2012 09:32:52 +0100 Subject: [PATCH] Added Recipe support for the tiddler marker "pluginmodule" This allows TW5 to output new-style plugin modules for the upcoming rewrite --- js/Recipe.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/js/Recipe.js b/js/Recipe.js index 91ea744b8..54d2865d1 100755 --- a/js/Recipe.js +++ b/js/Recipe.js @@ -359,6 +359,7 @@ Recipe.tiddlerOutputMapper = { shadow: "shadow", title: "title", jsmodule: "jsmodule", + pluginmodule: "pluginmodule", base64ie: "base64ie" }; @@ -423,6 +424,18 @@ Recipe.tiddlerOutputter = { out.push(""); } }, + pluginmodule: function(out,tiddlers) { + // plugin modules are output as a special script tag + for(var t=0; t"); + out.push("$tw.defineModule(\"" + title + "\",\"" + tid.module + "\",function(module,exports,require) {"); + out.push(tid.text); + out.push("});"); + out.push(""); + } + }, base64ie: function(out,tiddlers) { // For IE, we output binary tiddlers in MHTML format (http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/) if(tiddlers.length) {