How to build plugins

81 views
Skip to first unread message

Tristan

unread,
Jun 11, 2021, 8:17:05 AM6/11/21
to TiddlyWiki
I build a few plugins for TW over the years and the process was quite manual but since I do not change much once it is running I did not bother. However one of my plugins got a few friends of mine interested and so I was looking for a way to streamline the build process. Right now this is what I do:
  1. move hidden artifact (.fslckout) from my SCM system (fossil) out of the plugin dir
  2. run "node ./tiddlywiki.js edition/build --build index
  3. move the artifact back into the plugin dir since it is reqired to make commits/diff/etc.
  4. open the resulting index.html file in a browser
  5. navigate to the plugin
  6. click on "export to JSON"
  7. send that file to my friends
What I would like to have is a command that just creates the resulting JSON file without all those manual steps. Is there a TW command that just build a single plugin?

Saq Imtiaz

unread,
Jun 11, 2021, 9:49:02 AM6/11/21
to TiddlyWiki
Have a look at https://github.com/Jermolene/TiddlyWiki5/discussions/5500#discussioncomment-374512

Also, if you use tiddlywiki.files to specify what to include in the plugin, you don't need to worry about moving things in and out that you don't want included in the plugin.
See https://tiddlywiki.com/#tiddlywiki.files%20Files

Saq Imtiaz

unread,
Jun 11, 2021, 9:50:56 AM6/11/21
to TiddlyWiki
PS: I maintain a very niche plugin that some close friends and myself are using. I have the build process push the plugin file to a server. In the TiddlyWiki, there is a startup module that checks the version of that remote plugin and if it is newer than the installed version, it updates it.

Tristan

unread,
Jun 13, 2021, 3:33:22 AM6/13/21
to TiddlyWiki
Thank you, I knew about tiddlywiki.files from a past question but forgot it again since I could not quite figure out the documentation. I will check it out again and try to puzzle it out this time :)
Reply all
Reply to author
Forward
0 new messages