1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-12 05:23:00 +00:00

Ensure that the core plugins inherit their version number from the main package.info

This commit is contained in:
Jeremy Ruston
2013-08-26 13:28:23 +01:00
parent 93e7cd7409
commit 20f06e8eec
17 changed files with 21 additions and 18 deletions

View File

@@ -1168,6 +1168,10 @@ $tw.loadPluginFolder = function(filepath,excludeRegExp) {
}
}
}
// Give the plugin the same version number as the core if it doesn't have one
if(!("version" in pluginInfo)) {
pluginInfo.version = $tw.packageInfo.version;
}
// Save the plugin tiddler
if(pluginInfo) {
var fields = {
@@ -1176,6 +1180,7 @@ $tw.loadPluginFolder = function(filepath,excludeRegExp) {
text: JSON.stringify(pluginInfo,null,4),
"plugin-priority": pluginInfo["plugin-priority"],
"name": pluginInfo["name"],
"version": pluginInfo["version"],
"thumbnail": pluginInfo["thumbnail"],
"description": pluginInfo["description"],
"plugin-type": pluginInfo["plugin-type"] || "plugin"