diff --git a/core/modules/library.js b/core/modules/library.js new file mode 100644 index 000000000..c238e7ef1 --- /dev/null +++ b/core/modules/library.js @@ -0,0 +1,100 @@ +/*\ +title: $:/core/modules/library.js +type: application/javascript +module-type: global + +Library handling utilities + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +function Library(options) { +} + +/* +*/ +Library.prototype.getLibraryItems = function() { + if(!this.items) { + this.loadLibraryItems(); + } +}; + +/* +*/ +Library.prototype.loadLibraryItems = function() { + var self = this, + fs = require("fs"), + path = require("path"); + // Collect the library items from disk + this.items = {}; + var collectPlugins = function(folder) { + var pluginFolders = $tw.utils.getSubdirectories(folder) || []; + for(var p=0; p + + + + + + + +Plugin Library + + + + +

HelloThere

+ +

This is the TiddlyWiki plugin library. It is not intended to be opened directly in the browser.

+ +

See https://tiddlywiki.com/ for details of how to install plugins.

+ + + \ No newline at end of file diff --git a/plugins/tiddlywiki/tiddlyweb/BuiltInLibrary.tid b/plugins/tiddlywiki/tiddlyweb/BuiltInLibrary.tid new file mode 100644 index 000000000..f5e212563 --- /dev/null +++ b/plugins/tiddlywiki/tiddlyweb/BuiltInLibrary.tid @@ -0,0 +1,6 @@ +title: $:/plugins/tiddlywiki/tiddlyweb/BuiltinLibrary +tags: $:/tags/PluginLibrary +url: /library +caption: TiddlyWiki Built-in Plugin Library + +This is the TiddlyWiki Built-in Plugin Library