From 3b9bc6033c732940f440e12d98b2c5e4c34ca608 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 4 May 2012 17:45:36 +0100 Subject: [PATCH] Refactoring And recording the wiki directory for later --- rabbithole/core/boot.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rabbithole/core/boot.js b/rabbithole/core/boot.js index 12b0b89cd..3b88cc2d7 100644 --- a/rabbithole/core/boot.js +++ b/rabbithole/core/boot.js @@ -51,7 +51,7 @@ $tw.config = $tw.config || {}; // Constants $tw.config.root = $tw.config.root || "$:"; // Root for module titles (eg, "$:/kernel/boot.js") -$tw.config.pluginSubDir = $tw.config.pluginSubDir || "./modules"; +$tw.config.moduleSubDir = $tw.config.moduleSubDir || "./modules"; // File extensions $tw.config.fileExtensions = { @@ -520,6 +520,7 @@ var fs = require("fs"), $tw.boot.bootFile = path.basename(module.filename); $tw.boot.bootPath = path.dirname(module.filename); +$tw.boot.wikiPath = process.cwd(); /* Load the tiddlers contained in a particular file (and optionally the accompanying .meta file) @@ -598,7 +599,10 @@ $tw.modules.execute = function(moduleName,moduleRoot) { } // Load plugins from the plugins directory -$tw.plugins.loadPlugins(path.resolve($tw.boot.bootPath,$tw.config.pluginSubDir)); +$tw.plugins.loadPlugins(path.resolve($tw.boot.bootPath,$tw.config.moduleSubDir)); + +// Load plugins from the TiddlyWiki store directory +$tw.plugins.loadPlugins($tw.boot.wikiPath); // End of if(!$tw.isBrowser) }