mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-28 15:08:46 +00:00
savewikifolder: Fix custom plugin fields
We need to carry across all plugin fields into the tiddlywiki.info file
This commit is contained in:
parent
0a5c826816
commit
b7e0930122
@ -5,7 +5,7 @@ module-type: command
|
|||||||
|
|
||||||
Command to save the current wiki as a wiki folder
|
Command to save the current wiki as a wiki folder
|
||||||
|
|
||||||
--savewikifolder <wikifolderpath> [<filter>] [<options>]
|
--savewikifolder <wikifolderpath> [<filter>]
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
(function(){
|
(function(){
|
||||||
@ -148,13 +148,7 @@ WikiFolderMaker.prototype.saveCustomPlugin = function(pluginTiddler) {
|
|||||||
directory = $tw.utils.generateTiddlerFilepath(titleParts[titleParts.length - 1],{
|
directory = $tw.utils.generateTiddlerFilepath(titleParts[titleParts.length - 1],{
|
||||||
directory: path.resolve(this.wikiFolderPath,pluginTiddler.fields["plugin-type"] + "s")
|
directory: path.resolve(this.wikiFolderPath,pluginTiddler.fields["plugin-type"] + "s")
|
||||||
}),
|
}),
|
||||||
pluginInfo = {
|
pluginInfo = pluginTiddler.getFieldStrings({exclude: ["text","type"]});
|
||||||
title: pluginTitle,
|
|
||||||
description: pluginTiddler.fields.description,
|
|
||||||
author: pluginTiddler.fields.author,
|
|
||||||
"core-version": pluginTiddler.fields["core-version"],
|
|
||||||
list: pluginTiddler.fields.list
|
|
||||||
};
|
|
||||||
this.saveJSONFile(directory + path.sep + "plugin.info",pluginInfo);
|
this.saveJSONFile(directory + path.sep + "plugin.info",pluginInfo);
|
||||||
self.log("Writing " + directory + path.sep + "plugin.info: " + JSON.stringify(pluginInfo,null,$tw.config.preferences.jsonSpaces));
|
self.log("Writing " + directory + path.sep + "plugin.info: " + JSON.stringify(pluginInfo,null,$tw.config.preferences.jsonSpaces));
|
||||||
var pluginTiddlers = JSON.parse(pluginTiddler.fields.text).tiddlers; // A hashmap of tiddlers in the plugin
|
var pluginTiddlers = JSON.parse(pluginTiddler.fields.text).tiddlers; // A hashmap of tiddlers in the plugin
|
||||||
|
Loading…
Reference in New Issue
Block a user