1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00
TiddlyWiki5/bin/readme.md

5 lines
7.1 KiB
Markdown
Raw Normal View History

2014-09-12 13:25:12 +00:00
<h1 class=''>Script Files</h1><p>The <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> repository contains several scripts in the <code>bin</code> folder that are used to build and deploy <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki.html'>TiddlyWiki</a> (<code>.sh</code> for *nix and <code>.cmd</code> for Windows). They can serve as a useful starting point for your own scripts.</p><p>All the scripts expect to be run from the root folder of the repository.</p><h2 class=''><code>bld</code>: builds tw5.com</h2><p>This script builds several variants of <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> for deployment on tiddlywiki.com.</p><p>By default, files are output to a folder called <code>jermolene.github.com</code>, sibling to the <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> repo directory. For example:</p><pre><code>/TiddlyWork/ - Directory for working with TiddlyWiki5
|
+--+-- /TiddlyWiki5/ - Directory containing the TiddlyWiki5 repo from GitHub
|
2014-09-12 15:54:32 +00:00
+-- /jermolene.github.com/ - Directory for output files</code></pre><p>You can override the build output directory by defining the environment variable <code>TW5_BUILD_OUTPUT</code>. The easiest way to do this is to create a personal batch file to invoke <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> that first sets the environment variable and then invokes <code>bld</code>.</p><p>The files output by <code>bld</code> are:</p><ul><li><code>readme.md</code> main readme file, output to the <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> directory</li><li><code>index.html</code> <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> standalone HTML file with content from the <code>tw5.com</code> edition</li><li><code>empty.html</code> <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> standalone HTML file with no content</li><li><code>encrypted.html</code> <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> standalone HTML file encrypted with the password <code>password</code></li><li><code>test.html</code> <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> browser-based test suite (see <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TestingMechanism.html'>TestingMechanism</a>)</li><li><code>static.html</code> static HTML version of the <a class='tc-tiddlylink tc-tiddlylink-missing' href='http://tiddlywiki.com/static/DefaultTiddlers.html'>DefaultTiddlers</a> of the <code>tw5.com</code> edition</li><li><code>static/*.html</code> and <code>static/static.css</code> static HTML versions of individual tiddlers</li></ul><p><code>bld</code> also runs the <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> Node.js-based test suite (see <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TestingMechanism.html'>TestingMechanism</a>)</p><h2 class=''><code>serve</code>: serves tw5.com</h2><pre><code>./bin/serve.sh &lt;username&gt; [&lt;password&gt;]</code></pre><p>Or:</p><pre><code>./bin/serve.cmd &lt;username&gt; [&lt;password&gt;]</code></pre><p>This script starts <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> running as an HTTP server with the content from the <code>tw5.com-server</code> edition. By default, the Node.js serves on port 8080. If the optional <code>username</code> parameter is provided, it is used for signing edits. If the <code>password</code> is provided then HTTP basic authentication is used.</p><p>To experiment with this configuration, run the script and then visit <code>http://127.0.0.1:8080</code> in a browser.</p><p>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).</p><h2 class=''><code>test</code>: build and run tests</h2><p>This script runs the <code>test</code> edition of <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/TiddlyWiki.html'>TiddlyWiki</a> on the server to perform the server-side tests and to build <code>test.html</code> for running the tests in the browser.</p><h2 class=''><code>lazy</code>: serves tw5.com with lazily loaded images</h2><pre><code>./bin/lazy.sh &lt;username&gt; [&lt;password&gt;]</code></pre><p>Or:</p><pre><code>./bin/lazy.cmd &lt;username&gt; [&lt;password&gt;]</code></pre><p>This script serves the <code>tw5.com-server</code> edition content with <a class='tc-tiddlylink tc-tiddlylink-resolves' href='http://tiddlywiki.com/static/LazyLoading.html'>LazyLoading</a> applied to images.</p><h2 class=''><co