1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-18 11:29:55 +00:00

Refactoring

And recording the wiki directory for later
This commit is contained in:
Jeremy Ruston 2012-05-04 17:45:36 +01:00
parent 4ad0187ad8
commit 3b9bc6033c

View File

@ -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)
}