diff --git a/core/modules/serializers.js b/core/modules/serializers.js index 7aea73642..e6952de9b 100644 --- a/core/modules/serializers.js +++ b/core/modules/serializers.js @@ -22,7 +22,7 @@ var mapEachTiddler = function(wiki,tiddlers,callback) { } } return result.join(""); -} +}; exports["text/plain"] = function(tiddlers) { return mapEachTiddler(this,tiddlers,function(tiddler) { @@ -89,6 +89,12 @@ exports["application/x-tiddler-module"] = function(tiddlers) { }); }; +exports["application/x-tiddler-module-plain"] = function(tiddlers) { + return mapEachTiddler(this,tiddlers,function(tiddler) { + return "$tw.modules.define(\"" + tiddler.fields.title + "\",\"" + tiddler.fields["module-type"] + "\",function(module,exports,require) {" + tiddler.fields.text + "});\n"; + }); +}; + exports["application/x-tiddler-library"] = function(tiddlers) { return mapEachTiddler(this,tiddlers,function(tiddler) { var attributes = {