From cd36f594c54859d8d8eacad0eca55e1ef3bb4e72 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 28 Mar 2013 17:07:30 +0000 Subject: [PATCH] Make the core into a plugin --- {core/styles => boot}/boot.css.tid | 0 {core => boot}/boot.js | 11 +++++++---- {core => boot}/bootprefix.js | 0 {core => boot}/sjcl.js | 0 {core => boot}/sjcl.js.meta | 0 core/modules/startup.js | 3 +-- core/modules/wiki.js | 2 +- core/plugin.info | 7 +++++++ core/styles/base.tid | 2 +- tiddlywiki.js | 2 +- 10 files changed, 18 insertions(+), 9 deletions(-) rename {core/styles => boot}/boot.css.tid (100%) rename {core => boot}/boot.js (99%) rename {core => boot}/bootprefix.js (100%) rename {core => boot}/sjcl.js (100%) rename {core => boot}/sjcl.js.meta (100%) create mode 100644 core/plugin.info diff --git a/core/styles/boot.css.tid b/boot/boot.css.tid similarity index 100% rename from core/styles/boot.css.tid rename to boot/boot.css.tid diff --git a/core/boot.js b/boot/boot.js similarity index 99% rename from core/boot.js rename to boot/boot.js index 1ac7a4f62..5325d0a37 100644 --- a/core/boot.js +++ b/boot/boot.js @@ -599,7 +599,7 @@ $tw.Wiki.prototype.definePluginModules = function() { $tw.utils.each(this.shadowTiddlers,function(element,title,object) { var tiddler = self.getTiddler(title); if(!$tw.utils.hop(self.tiddlers,title)) { // Don't define the module if it is overidden by an ordinary tiddler - if(tiddler.fields.type === "application/javascript" && tiddler.hasField("module-type")) { + if(tiddler.hasField("module-type")) { // Define the module $tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],tiddler.fields.text); } @@ -1035,7 +1035,7 @@ $tw.loadWikiTiddlers = function(wikiPath,parentPaths) { } // Load any plugins listed in the wiki info file if(wikiInfo.plugins) { - var pluginBasePath = path.resolve($tw.boot.bootPath,$tw.config.pluginsPath); + var pluginBasePath = path.resolve($tw.boot.corePath,$tw.config.pluginsPath); for(var t=0; t=5.0.0" +} diff --git a/core/styles/base.tid b/core/styles/base.tid index 7cc650250..918589489 100644 --- a/core/styles/base.tid +++ b/core/styles/base.tid @@ -1,5 +1,5 @@ title: $:/core/styles/base -tags: $:/core/styles +module-type: stylesheet \rules only filteredtranscludeinline transcludeinline macrodef macrocallinline \define border-radius(radius) diff --git a/tiddlywiki.js b/tiddlywiki.js index 422d238a7..b53581984 100755 --- a/tiddlywiki.js +++ b/tiddlywiki.js @@ -4,4 +4,4 @@ This is invoked as a shell script by NPM when the `tiddlywiki` command is typed */ -var tiddlywiki = require("./core/boot.js"); +var tiddlywiki = require("./boot/boot.js");