/*\ title: $:/core/modules/commands/makelibrary.js type: application/javascript module-type: command Command to pack all of the plugins in the library into a plugin tiddler of type "library" \*/ (function(){ /*jslint node: true, browser: true */ /*global $tw: false */ "use strict"; exports.info = { name: "makelibrary", synchronous: true }; var UPGRADE_LIBRARY_TITLE = "$:/UpgradeLibrary"; var Command = function(params,commander,callback) { this.params = params; this.commander = commander; this.callback = callback; }; Command.prototype.execute = function() { var wiki = this.commander.wiki, fs = require("fs"), path = require("path"), upgradeLibraryTitle = this.params[0] || UPGRADE_LIBRARY_TITLE, tiddlers = {}; // Collect up the library plugins var collectPlugins = function(folder) { var pluginFolders = $tw.utils.getSubdirectories(folder) || []; for(var p=0; p