1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-28 04:19:56 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/nodejs/Scripts for TiddlyWiki on Node.js.tid

55 lines
2.0 KiB
Plaintext
Raw Normal View History

2013-12-19 10:08:14 +00:00
created: 20131219100637788
2014-10-15 20:56:32 +00:00
modified: 20141015165343893
2014-09-12 15:05:37 +00:00
tags: [[TiddlyWiki on Node.js]]
2013-12-19 10:08:14 +00:00
title: Scripts for TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
! Script Files
2014-10-15 20:56:32 +00:00
The TiddlyWiki5 repository contains several scripts in the `bin` folder that you can use to automate common tasks, or as a useful starting point for your own scripts. See [[Scripts for building tiddlywiki.com]] for details of the scripts used to build and release http://tiddlywiki.com/.
All the scripts expect to be run from the root folder of the repository.
2013-12-19 10:08:14 +00:00
!! `serve`: serves tw5.com
```
2014-09-17 19:01:00 +00:00
./bin/serve.sh -h
./bin/serve.sh [edition dir] [username] [password] [host] [port]
2013-12-19 10:08:14 +00:00
```
Or:
```
2014-09-17 19:01:00 +00:00
./bin/serve.cmd -h
./bin/serve.cmd [edition dir] [username] [password] [host] [port]
2013-12-19 10:08:14 +00:00
```
2014-09-19 14:02:40 +00:00
This script starts TiddlyWiki5 running as an HTTP server, defaulting to the content from the `tw5.com-server` edition. By default, the Node.js serves on port 8080. If the optional `username` parameter is provided, it is used for signing edits. If the `password` is provided then HTTP basic authentication is used. Run the script with the `-h` parameter to see online help.
2013-12-19 10:08:14 +00:00
2014-01-02 20:07:05 +00:00
To experiment with this configuration, run the script and then visit `http://127.0.0.1:8080` in a browser.
2013-12-19 10:08:14 +00:00
Changes made in the browser propagate to the server over HTTP (use the browser developer console to see these requests). The server then syncs changes to the file system (and logs each change to the screen).
!! `test`: build and run tests
This script runs the `test` edition of TiddlyWiki on the server to perform the server-side tests and to build `test.html` for running the tests in the browser.
2014-02-06 22:21:03 +00:00
!! `lazy`: serves tw5.com with lazily loaded images
2013-12-19 10:08:14 +00:00
2014-02-06 22:21:03 +00:00
```
./bin/lazy.sh <username> [<password>]
2014-02-06 22:21:03 +00:00
```
Or:
```
./bin/lazy.cmd <username> [<password>]
2014-02-06 22:21:03 +00:00
```
This script serves the `tw5.com-server` edition content with LazyLoading applied to images.
2014-02-06 22:21:03 +00:00
2013-12-19 10:08:14 +00:00
!! `2bld`: builds TiddlyWiki 2.6.5
This script builds TiddlyWiki 2.6.5 from the original source and then displays the differences between them (`diff` is used for *nix, `fc` for Windows).