Use this plugin skeleton to easily develop TiddlyWiki5 plugins using the ThirdFlow plugin. For an easy introduction, you may want to watch the demo video.
-
Set Up...
-
clone this repository:
$ git clone https://github.com/TheDiveO/TiddlyWikiPluginSkeleton.git
. Optionally specify a different directory to clone into other thanTiddlyWikiPluginSkeleton
, by simply appending the new directory name to the git clone command. For instance:$ git clone https://github.com/TheDiveO/TiddlyWikiPluginSkeleton.git NewPlugin
, whereNewPlugin
is the directory to clone the plugin skeleton into. -
optionally edit
package.json
and fill in necessary data, such asname
,version
,author
,homepage
,license
, et cetera; the impatient can skip this step for the moment. This information becomes important only later if you intend to publish your TiddlyWiki5 plugin to the NPM registory, or want to prepare the option at least. -
run
npm install
to install the required TiddlyWiki5 core, as well as the ThirdFlow plugin from the NPM registry. -
run
$ npm run develop
. -
next, navigate to http://localhost:8080 in your web browser.
-
follow the instructions given in the "Plugin Kickstarter" to create your plugin.
-
-
Develop...
-
work on your plugin ... you can freely mix developing things inside the web browser as well as outside the browser using a standalone editor.
-
Don't forget to stop and then restart
$ npm run develop
after you've made changes to TiddlyWiki files outside your web browser.
-
-
Release...
-
to control which files to release, visit your TiddlyWiki's
$:/ControlPanel
and go to theThirdFlow
tab. Then click on the subtab namedRelease
. Follow the instructions given there. Please note that you can develop multiple plugins simultaneously from the same development TiddlyWiki. -
when you're ready to release, simply run
$ npm run release
to create the release file(s) ineditions/release/output
. Rinse, then repeat as necessary.
-
As you started from a cloned repository that doesn't belong to you and to which you have no write access to, you will most probably want to put this former skeleton repository under control of your own git repository. To do so, simple follow this receipe:
-
$ rm -rf .git
in this repository's top directory removes the now unnecessary skeleton git repository copy, so you can start afresh. -
$ git init
... sets up a new git repository for your new plugin. -
Did you adjust
package.json
? If not, please do so now. -
$ git add .
... this adds back in all existing files (unless blocked, see especially note #1 below). -
$ git commit -m "initializes and populates my plugin repository"
... finally commits all files into your new plugin repository. -
if you want to add your plugin repo also to GitHub:
-
while logged into your account on GitHub, create a new repository, but do not initialize it with any README, license,
.gitignore
, et cetera, files. -
copy the remote repository URL and do:
$ git remote add origin _copied-git-repository-url_
; remember to replace copied-git-repority-url with the real repository URL. Check with$ git remote -v
that the origin reporitory URL was set correctly. -
$ git push origin master
then finally pushes your plugin to your GitHub plugin repository.
-
That's it!
- in the default setup, the release files inside
editions/release/output
won't be undergit
source code control. The rationale is to keep generated files out of the manged sources. However, if you want to keep them instead undergit
control, simply remove the file.gitignore
ineditions/release/
.