1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-26 19:47:20 +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 // Save the plugin tiddler
if(pluginInfo) { if(pluginInfo) {
var fields = { var fields = {
@ -1176,6 +1180,7 @@ $tw.loadPluginFolder = function(filepath,excludeRegExp) {
text: JSON.stringify(pluginInfo,null,4), text: JSON.stringify(pluginInfo,null,4),
"plugin-priority": pluginInfo["plugin-priority"], "plugin-priority": pluginInfo["plugin-priority"],
"name": pluginInfo["name"], "name": pluginInfo["name"],
"version": pluginInfo["version"],
"thumbnail": pluginInfo["thumbnail"], "thumbnail": pluginInfo["thumbnail"],
"description": pluginInfo["description"], "description": pluginInfo["description"],
"plugin-type": pluginInfo["plugin-type"] || "plugin" "plugin-type": pluginInfo["plugin-type"] || "plugin"

View File

@ -2,7 +2,6 @@
"title": "$:/core", "title": "$:/core",
"description": "TiddlyWiki5 core plugin", "description": "TiddlyWiki5 core plugin",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0", "core-version": ">=5.0.0",
"plugin-priority": "0" "plugin-priority": "0"
} }

View File

@ -1,6 +1,6 @@
created: 201308251537 created: 201308251537
creator: JeremyRuston creator: JeremyRuston
modified: 201308252143 modified: 201308260831
modifier: JeremyRuston modifier: JeremyRuston
tags: introduction dev tags: introduction dev
title: DeveloperDocs title: DeveloperDocs
@ -9,7 +9,8 @@ This is the developer documentation hub for TiddlyWiki.
! Overview ! Overview
TiddlyWikiArchitecture * TiddlyWikiArchitecture
* [[TiddlyWiki5 Development Environment]]
! Developer Cookbooks ! Developer Cookbooks

View File

@ -1,6 +1,6 @@
created: 201308251618 created: 201308251618
creator: JeremyRuston creator: JeremyRuston
modified: 201308251618 modified: 201308260848
modifier: JeremyRuston modifier: JeremyRuston
tags: dev tags: dev
title: TiddlyWiki5 Development Environment title: TiddlyWiki5 Development Environment
@ -14,3 +14,8 @@ title: TiddlyWiki5 Development Environment
``` ```
npm link npm link
``` ```
! Bumping version numbers
As releases are made during development it is necessary to adjust the version number of various TiddlyWiki5 components. This is done with the [[npm version|https://npmjs.org/doc/version.html]] command.
** As described in #10 in [[this article by npm's author|http://blog.izs.me/post/1675072029/10-cool-things-you-probably-didnt-realize-npm-could-do]], when run from within a git repo this command will also commit the change and tag it

View File

@ -1,6 +1,9 @@
modified: 201305011454 created: 201308261220
title: PluginMechanism creator: JeremyRuston
modified: 201308261220
modifier: JeremyRuston
tags: mechanism tags: mechanism
title: PluginMechanism
[[Plugins]] are bundles of tiddlers that are distributed and managed as a single unit by being packed into a single JSON tiddler. If a tiddler isn't found in the main store, then the registered plugins are searched for it instead. [[Plugins]] are bundles of tiddlers that are distributed and managed as a single unit by being packed into a single JSON tiddler. If a tiddler isn't found in the main store, then the registered plugins are searched for it instead.
@ -47,6 +50,8 @@ On the server, plugins can be stored as ordinary JSON tiddlers but it is often m
The `plugin.info` file should contain the same JSON as given for plugin tiddlers above, with the `tiddlers` object omitted. The `plugin.info` file should contain the same JSON as given for plugin tiddlers above, with the `tiddlers` object omitted.
Note that if the `version` field is omitted from a `plugin.info` file when the plugin folder is packed then it is automatically filled in by the core to the current core version number. This is to ensure that all the core plugins carry the correct version number. Generally plugin authors will want to ensure that they do explicitly specify a version number.
! Plugin library ! Plugin library
The standard distribution of TiddlyWiki includes a number of standard plugins in the `plugins` directory. The standard distribution of TiddlyWiki includes a number of standard plugins in the `plugins` directory.

View File

@ -2,6 +2,5 @@
"title": "$:/plugins/tiddlywiki/classictools", "title": "$:/plugins/tiddlywiki/classictools",
"description": "Tools for working with classic TiddlyWiki documents", "description": "Tools for working with classic TiddlyWiki documents",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0" "core-version": ">=5.0.0"
} }

View File

@ -2,6 +2,5 @@
"title": "$:/plugins/tiddlywiki/codemirror", "title": "$:/plugins/tiddlywiki/codemirror",
"description": "Codemirror plugin", "description": "Codemirror plugin",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"coreVersion": ">=5.0.0" "coreVersion": ">=5.0.0"
} }

View File

@ -2,6 +2,5 @@
"title": "$:/plugins/tiddlywiki/d3", "title": "$:/plugins/tiddlywiki/d3",
"description": "d3.js plugin for TiddlyWiki5", "description": "d3.js plugin for TiddlyWiki5",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0" "core-version": ">=5.0.0"
} }

View File

@ -2,6 +2,5 @@
"title": "$:/plugins/tiddlywiki/filesystem", "title": "$:/plugins/tiddlywiki/filesystem",
"description": "File system synchronisation", "description": "File system synchronisation",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0" "core-version": ">=5.0.0"
} }

View File

@ -2,6 +2,5 @@
"title": "$:/plugins/tiddlywiki/fullscreen", "title": "$:/plugins/tiddlywiki/fullscreen",
"description": "Adds support for HTML5 full screen mode", "description": "Adds support for HTML5 full screen mode",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0" "core-version": ">=5.0.0"
} }

View File

@ -2,6 +2,5 @@
"title": "$:/plugins/tiddlywiki/jasmine", "title": "$:/plugins/tiddlywiki/jasmine",
"description": "Jasmine test framework plugin for TiddlyWiki5", "description": "Jasmine test framework plugin for TiddlyWiki5",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0" "core-version": ">=5.0.0"
} }

View File

@ -2,6 +2,5 @@
"title": "$:/plugins/tiddlywiki/tahoelafs", "title": "$:/plugins/tiddlywiki/tahoelafs",
"description": "Support for saving changes to Tahoe-LAFS", "description": "Support for saving changes to Tahoe-LAFS",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0" "core-version": ">=5.0.0"
} }

View File

@ -2,6 +2,5 @@
"title": "$:/plugins/tiddlywiki/tiddlyweb", "title": "$:/plugins/tiddlywiki/tiddlyweb",
"description": "TiddlyWeb and TiddlySpace components", "description": "TiddlyWeb and TiddlySpace components",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0" "core-version": ">=5.0.0"
} }

View File

@ -2,7 +2,6 @@
"title": "$:/themes/tiddlywiki/centralised", "title": "$:/themes/tiddlywiki/centralised",
"name": "Centralised", "name": "Centralised",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0", "core-version": ">=5.0.0",
"plugin-type": "theme", "plugin-type": "theme",
"description": "Experimental theme with a centred text column", "description": "Experimental theme with a centred text column",

View File

@ -2,7 +2,6 @@
"title": "$:/themes/tiddlywiki/snowwhite", "title": "$:/themes/tiddlywiki/snowwhite",
"name": "Snow White", "name": "Snow White",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0", "core-version": ">=5.0.0",
"plugin-type": "theme", "plugin-type": "theme",
"description": "A plain simple theme that emphasises individual tiddlers" "description": "A plain simple theme that emphasises individual tiddlers"

View File

@ -2,7 +2,6 @@
"title": "$:/themes/tiddlywiki/starlight", "title": "$:/themes/tiddlywiki/starlight",
"name": "Starlight", "name": "Starlight",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0", "core-version": ">=5.0.0",
"plugin-type": "theme", "plugin-type": "theme",
"description": "An alternate theme", "description": "An alternate theme",

View File

@ -2,7 +2,6 @@
"title": "$:/themes/tiddlywiki/stickytitles", "title": "$:/themes/tiddlywiki/stickytitles",
"name": "Sticky Titles", "name": "Sticky Titles",
"author": "JeremyRuston", "author": "JeremyRuston",
"version": "0.0.0",
"core-version": ">=5.0.0", "core-version": ">=5.0.0",
"plugin-type": "theme", "plugin-type": "theme",
"description": "Experimental theme with titles that stick to the top of the window", "description": "Experimental theme with titles that stick to the top of the window",