This page is part of a static HTML representation of the TiddlyWiki at

Scripts for building

These scripts are used to build and release the content for They are not designed for general purpose use – they resolve problems that are specific to the task of building pushing to GitHub Pages, handling the prerelease builds and bumping version numbers.

Nonetheless, you may find techniques that are useful for your own scripts.

Hosting is served by GitHub Pages from the repository

The scripts live in the repository

Directory structure

These scripts require the following directories to be siblings:

The scripts are designed to be executed with the current directory being the TiddlyWiki5 directory.



The package.json in the root of the repository contains a dependency declaration that specifies the latest official released version of TiddlyWiki to be used when building the release targets:

  "dependencies": {
    "tiddlywiki": "5.1.2"

Environment variables

Some of the scripts use the following environment variables:

  • TW5_BUILD_MAIN_EDITION - the path to the wiki folder to be used as the main edition, generating index.html and encrypted.html
  • TW5_BUILD_OUTPUT - the path to the output folder (defaults to ../
  • TW5_BUILD_TIDDLYWIKI - the pathname of the tiddlywiki.js to be used (defaults to ../


Builds the target files. By default, it uses the version of tiddlywiki specified in the package.json file. This can be overridden with the TW5_BUILD_TIDDLYWIKI environment variable. The following command would select the latest prerelease version of tiddlywiki from the TiddlyWiki5 directory:


Builds the readme files for the TiddlyWiki5 and repos using the released version of TiddlyWiki specified in package.json.

Builds the target files using the latest TiddlyWiki prerelease code and special prerelease edition for the content.

Pushes the latest changes to the directory to GitHub.

Builds the dev prerelease edition.

Builds the prerelease prerelease edition.

Builds the tw5tiddlyweb edition and uploads it to TiddlySpace.

Bumps the version number of the package.json in the TiddlyWiki5 repo and applies the correct version tag to the repo.

Publishes the TiddlyWiki5 repo to npm.


Releasing a new version of TiddlyWiki

  1. Move the latest release note from the prerelease edition into the edition
  2. Adjust the release date and the released field of the latest release tiddler (eg, Release 5.1.3)
  3. Ensure TiddlyWiki Releases has the new version as the default tab
  4. Adjust the modified time of HelloThere
  5. Make sure Jermolene/TiddlyWiki5 is fully committed
  6. Edit package.json to the new version number
  7. Run ../ to build the readme files
  8. Commit the new readme files in TiddlyWiki5
  9. Restore package.json to the previous version number
  10. Run ../ "5.1.3" (substituting the correct version number) to update the version number, assign it a tag
  11. Run ../ to publish the release to npm
  12. Update the package.json for to the new version
  13. Verify that the new release of TiddlyWiki is available at
  14. Change current directory to the directory
  15. Run npm install to install the correct version of TiddlyWiki
  16. Change current directory to the TiddlyWiki5 directory
  17. Run ../ to build the content files
  18. Verify that the files in the directory are correct
  19. Run ../ to push the new files to GitHub
  20. Run ../ <username> <password> to upload the release to TiddlySpace
  21. Tweet the release with the text "TiddlyWiki v5.x.x released to #newtiddlywikirelease"
  22. Preparation for the next release:
    1. Adjust version number in $:/config/OfficialPluginLibrary
    2. Adjust version number in in, and

Releasing new content for TiddlyWiki

  1. Change current directory to the TiddlyWiki5 directory
  2. Run ../ to build the content files
  3. Run ../ to build the readmes
  4. Commit the readmes to TiddlyWiki5 and if necessary
  5. Verify that the files in the directory are correct
  6. Run ../ to push the new files to GitHub