mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 19:47:20 +00:00
parent
d2d0b09235
commit
e6b783154f
29
boot/boot.js
29
boot/boot.js
@ -1462,24 +1462,25 @@ $tw.loadPluginFolder = function(filepath,excludeRegExp) {
|
|||||||
if(!("version" in pluginInfo)) {
|
if(!("version" in pluginInfo)) {
|
||||||
pluginInfo.version = $tw.packageInfo.version;
|
pluginInfo.version = $tw.packageInfo.version;
|
||||||
}
|
}
|
||||||
// Save the plugin tiddler
|
// Use "plugin" as the plugin-type if we don't have one
|
||||||
if(pluginInfo) {
|
if(!("plugin-type" in pluginInfo)) {
|
||||||
return {
|
pluginInfo["plugin-type"] = "plugin";
|
||||||
title: pluginInfo.title,
|
|
||||||
type: "application/json",
|
|
||||||
text: JSON.stringify({tiddlers: pluginInfo.tiddlers},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",
|
|
||||||
"dependents": $tw.utils.stringifyList(pluginInfo["dependents"] || [])
|
|
||||||
}
|
}
|
||||||
|
pluginInfo.dependents = pluginInfo.dependents || [];
|
||||||
|
pluginInfo.type = "application/json";
|
||||||
|
// Set plugin text
|
||||||
|
pluginInfo.text = JSON.stringify({tiddlers: pluginInfo.tiddlers},null,4);
|
||||||
|
delete pluginInfo.tiddlers;
|
||||||
|
// Deserialise array fields (currently required for the dependents field)
|
||||||
|
for(var field in pluginInfo) {
|
||||||
|
if($tw.utils.isArray(pluginInfo[field])) {
|
||||||
|
pluginInfo[field] = $tw.utils.stringifyList(pluginInfo[field]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pluginInfo;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user