mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-27 22:58:19 +00:00
Refactoring
And recording the wiki directory for later
This commit is contained in:
parent
4ad0187ad8
commit
3b9bc6033c
@ -51,7 +51,7 @@ $tw.config = $tw.config || {};
|
|||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
$tw.config.root = $tw.config.root || "$:"; // Root for module titles (eg, "$:/kernel/boot.js")
|
$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
|
// File extensions
|
||||||
$tw.config.fileExtensions = {
|
$tw.config.fileExtensions = {
|
||||||
@ -520,6 +520,7 @@ var fs = require("fs"),
|
|||||||
|
|
||||||
$tw.boot.bootFile = path.basename(module.filename);
|
$tw.boot.bootFile = path.basename(module.filename);
|
||||||
$tw.boot.bootPath = path.dirname(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)
|
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
|
// 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)
|
// End of if(!$tw.isBrowser)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user