1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-28 02:50:27 +00:00

Fix makelibrary.js to use enviroment variable paths (#4559)

This makes makelibrary.js use environment variables to find paths for plugins, themes and languages instead of just using the paths hardcoded in boot.js
This commit is contained in:
jed 2020-04-14 13:03:12 +02:00 committed by GitHub
parent 84eaee8210
commit 4146a04a9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,9 +51,20 @@ Command.prototype.execute = function() {
}
}
};
collectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.pluginsPath));
collectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.themesPath));
collectPlugins(path.resolve($tw.boot.corePath,$tw.config.languagesPath));
var pluginsPaths = $tw.getLibraryItemSearchPaths($tw.config.pluginsPath,$tw.config.pluginsEnvVar);
for(var u=0; u<pluginsPaths.length; u++) {
collectPublisherPlugins(pluginsPaths[u]);
}
var themesPaths = $tw.getLibraryItemSearchPaths($tw.config.themesPath,$tw.config.themesEnvVar);
for(var u=0; u<themesPaths.length; u++) {
collectPublisherPlugins(themesPaths[u]);
}
var languagesPaths = $tw.getLibraryItemSearchPaths($tw.config.languagesPath,$tw.config.languagesEnvVar);
for(var u=0; u<languagesPaths.length; u++) {
collectPlugins(languagesPaths[u]);
}
// Save the upgrade library tiddler
var pluginFields = {
title: upgradeLibraryTitle,