From e9557b578e0f52241a4292e061eab479afe0d633 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 27 Apr 2014 08:28:21 +0100 Subject: [PATCH] Improve output directory handling This change is likely to break most existing scripts that call TiddlyWiki. TL;DR - output paths are now relative to the editions/output folder, rather than to the current folder See [[Notes for upgrading to 5.0.11-beta]] for details. --- 2bld.cmd | 16 ++------ 2bld.sh | 10 ++--- bld-languages.sh | 20 ++++++---- bld.cmd | 35 +++++++++++------- bld.sh | 37 +++++++++++-------- core/language/en-GB/Help/output.tid | 4 +- core/language/en-GB/Help/rendertiddler.tid | 2 + core/language/en-GB/Help/rendertiddlers.tid | 2 + core/language/en-GB/Help/savetiddler.tid | 2 + core/modules/commander.js | 2 +- core/modules/commands/output.js | 2 +- .../tw5.com/tiddlers/Release 5.0.11beta.tid | 31 ++++++++++++++++ .../Notes for upgrading to 5.0.11-beta.tid | 23 ++++++++++++ ginsu.cmd | 9 ++--- ginsu.sh | 8 ++-- qbld.cmd | 5 ++- qbld.sh | 5 ++- tankbld.cmd | 7 +--- tankbld.sh | 7 +--- test.cmd | 3 +- test.sh | 3 +- wbld.cmd | 7 +--- wbld.sh | 3 +- 23 files changed, 151 insertions(+), 92 deletions(-) create mode 100644 editions/tw5.com/tiddlers/Release 5.0.11beta.tid create mode 100644 editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.11-beta.tid diff --git a/2bld.cmd b/2bld.cmd index 2abdf1f91..bf2a64ae4 100644 --- a/2bld.cmd +++ b/2bld.cmd @@ -2,22 +2,13 @@ rem build TiddlyWiki 2.x -rem create a temporary directory if it doesn't already exist -setlocal enableextensions -mkdir tmp\tw2 -setlocal disableextensions - -rem Delete any existing content - -del /q /s tmp\tw2 -echo. - rem Prepare the readme file from the revelant content in the tw5.com wiki node .\tiddlywiki.js ^ editions\tw5.com ^ --verbose ^ - --rendertiddler TiddlyWiki2ReadMe editions\tw2\readme.md text/html ^ + --output editions\tw2 ^ + --rendertiddler TiddlyWiki2ReadMe readme.md text/html ^ || exit 1 rem cook the TiddlyWiki 2.x.x index file @@ -25,8 +16,9 @@ rem cook the TiddlyWiki 2.x.x index file node .\tiddlywiki.js ^ editions\tw2 ^ --verbose ^ + --output tmp\tw2 ^ --load editions\tw2\source\tiddlywiki.com\index.html.recipe ^ - --rendertiddler $:/core/templates/tiddlywiki2.template.html .\tmp\tw2\index.html text/plain ^ + --rendertiddler $:/core/templates/tiddlywiki2.template.html index.html text/plain ^ || exit 1 fc tmp\tw2\index.html editions\tw2\target\prebuilt.html diff --git a/2bld.sh b/2bld.sh index 84d1aeb6b..e0b8d30c1 100755 --- a/2bld.sh +++ b/2bld.sh @@ -2,16 +2,13 @@ # build TiddlyWiki 2.x -# create a temporary directory if it doesn't already exist -mkdir -p tmp -mkdir -p tmp/tw2 - # Prepare the readme file from the revelant content in the tw5.com wiki node ./tiddlywiki.js \ editions/tw5.com \ --verbose \ - --rendertiddler TiddlyWiki2ReadMe editions/tw2/readme.md text/html \ + --output editions/tw2 \ + --rendertiddler TiddlyWiki2ReadMe readme.md text/html \ || exit 1 # cook the TiddlyWiki 2.x.x index file @@ -19,8 +16,9 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ editions/tw2 \ --verbose \ + --output tmp/tw2 \ --load editions/tw2/source/tiddlywiki.com/index.html.recipe \ - --rendertiddler $:/core/templates/tiddlywiki2.template.html ./tmp/tw2/index.html text/plain \ + --rendertiddler $:/core/templates/tiddlywiki2.template.html index.html text/plain \ || exit 1 diff -q tmp/tw2/index.html editions/tw2/target/prebuilt.html diff --git a/bld-languages.sh b/bld-languages.sh index 9c2f007b6..e27a8e941 100644 --- a/bld-languages.sh +++ b/bld-languages.sh @@ -25,28 +25,32 @@ echo "tiddlywiki.com" > $TW5_BUILD_OUTPUT/CNAME node ./tiddlywiki.js \ ./editions/de-AT-DE \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/de-AT-DE.html text/plain \ - --savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all de-AT-DE.html text/plain \ + --savetiddler $:/favicon.ico favicon.ico \ || exit 1 node ./tiddlywiki.js \ ./editions/zh-Hant \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/zh-Hant.html text/plain \ - --savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all zh-Hant.html text/plain \ + --savetiddler $:/favicon.ico favicon.ico \ || exit 1 node ./tiddlywiki.js \ ./editions/zh-Hans \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/zh-Hans.html text/plain \ - --savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all zh-Hans.html text/plain \ + --savetiddler $:/favicon.ico favicon.ico \ || exit 1 node ./tiddlywiki.js \ ./editions/fr-FR \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/fr-FR.html text/plain \ - --savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all fr-FR.html text/plain \ + --savetiddler $:/favicon.ico favicon.ico \ || exit 1 diff --git a/bld.cmd b/bld.cmd index f674a09a2..8beae71e9 100644 --- a/bld.cmd +++ b/bld.cmd @@ -34,18 +34,19 @@ rem static.html: the static version of the default tiddlers node .\tiddlywiki.js ^ .\editions\tw5.com ^ --verbose ^ - --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\index.html text/plain ^ - --savetiddler $:/favicon.ico %TW5_BUILD_OUTPUT%\favicon.ico ^ + --output %TW5_BUILD_OUTPUT% ^ + --rendertiddler $:/core/save/all index.html text/plain ^ + --savetiddler $:/favicon.ico favicon.ico ^ --rendertiddler ReadMe .\readme.md text/html ^ --rendertiddler ContributingTemplate .\contributing.md text/html ^ --rendertiddler $:/core/copyright.txt .\licenses\copyright.md text/plain ^ - --rendertiddler $:/editions/tw5.com/download-empty %TW5_BUILD_OUTPUT%\empty.html text/plain ^ - --rendertiddler $:/editions/tw5.com/download-empty %TW5_BUILD_OUTPUT%\empty.hta text/plain ^ + --rendertiddler $:/editions/tw5.com/download-empty empty.html text/plain ^ + --rendertiddler $:/editions/tw5.com/download-empty empty.hta text/plain ^ --savetiddler $:/green_favicon.ico %TW5_BUILD_OUTPUT%/static/favicon.ico ^ - --rendertiddler $:/core/templates/static.template.html %TW5_BUILD_OUTPUT%\static.html text/plain ^ - --rendertiddler $:/core/templates/alltiddlers.template.html %TW5_BUILD_OUTPUT%\alltiddlers.html text/plain ^ - --rendertiddler $:/core/templates/static.template.css %TW5_BUILD_OUTPUT%\static\static.css text/plain ^ - --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html %TW5_BUILD_OUTPUT%\static text/plain ^ + --rendertiddler $:/core/templates/static.template.html static.html text/plain ^ + --rendertiddler $:/core/templates/alltiddlers.template.html alltiddlers.html text/plain ^ + --rendertiddler $:/core/templates/static.template.css static\static.css text/plain ^ + --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain ^ || exit 1 rem encrypted.html: a version of the main file encrypted with the password "password" @@ -53,8 +54,9 @@ rem encrypted.html: a version of the main file encrypted with the password "pass node .\tiddlywiki.js ^ .\editions\tw5.com ^ --verbose ^ + --output %TW5_BUILD_OUTPUT% ^ --password password ^ - --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\encrypted.html text/plain ^ + --rendertiddler $:/core/save/all encrypted.html text/plain ^ || exit 1 rem tahoelafs.html: empty wiki with plugin for Tahoe-LAFS @@ -62,7 +64,8 @@ rem tahoelafs.html: empty wiki with plugin for Tahoe-LAFS node .\tiddlywiki.js ^ .\editions\tahoelafs ^ --verbose ^ - --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\tahoelafs.html text/plain ^ + --output %TW5_BUILD_OUTPUT% ^ + --rendertiddler $:/core/save/all tahoelafs.html text/plain ^ || exit 1 rem d3demo.html: wiki to demo d3 plugin @@ -70,7 +73,8 @@ rem d3demo.html: wiki to demo d3 plugin node .\tiddlywiki.js ^ .\editions\d3demo ^ --verbose ^ - --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\d3demo.html text/plain ^ + --output %TW5_BUILD_OUTPUT% ^ + --rendertiddler $:/core/save/all d3demo.html text/plain ^ || exit 1 rem codemirrordemo.html: wiki to demo codemirror plugin @@ -78,7 +82,8 @@ rem codemirrordemo.html: wiki to demo codemirror plugin node .\tiddlywiki.js ^ .\editions\codemirrordemo ^ --verbose ^ - --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\codemirrordemo.html text/plain ^ + --output %TW5_BUILD_OUTPUT% ^ + --rendertiddler $:/core/save/all codemirrordemo.html text/plain ^ || exit 1 rem markdowndemo.html: wiki to demo markdown plugin @@ -86,7 +91,8 @@ rem markdowndemo.html: wiki to demo markdown plugin node .\tiddlywiki.js ^ .\editions\markdowndemo ^ --verbose ^ - --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\markdowndemo.html text/plain ^ + --output %TW5_BUILD_OUTPUT% ^ + --rendertiddler $:/core/save/all markdowndemo.html text/plain ^ || exit 1 @@ -95,7 +101,8 @@ rem highlightdemo.html: wiki to demo highlight plugin node .\tiddlywiki.js ^ .\editions\highlightdemo ^ --verbose ^ - --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\highlightdemo.html text/plain ^ + --output %TW5_BUILD_OUTPUT% ^ + --rendertiddler $:/core/save/all highlightdemo.html text/plain ^ || exit 1 rem Make the CNAME file that GitHub Pages requires diff --git a/bld.sh b/bld.sh index 827607f80..7799dddf9 100755 --- a/bld.sh +++ b/bld.sh @@ -35,18 +35,19 @@ rm $TW5_BUILD_OUTPUT/static/* node ./tiddlywiki.js \ ./editions/tw5.com \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/index.html text/plain \ - --savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all index.html text/plain \ + --savetiddler $:/favicon.ico favicon.ico \ --rendertiddler ReadMe ./readme.md text/html \ --rendertiddler ContributingTemplate ./contributing.md text/html \ --rendertiddler $:/core/copyright.txt ./licenses/copyright.md text/plain \ - --rendertiddler $:/editions/tw5.com/download-empty $TW5_BUILD_OUTPUT/empty.html text/plain \ - --rendertiddler $:/editions/tw5.com/download-empty $TW5_BUILD_OUTPUT/empty.hta text/plain \ - --savetiddler $:/green_favicon.ico $TW5_BUILD_OUTPUT/static/favicon.ico \ - --rendertiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \ - --rendertiddler $:/core/templates/alltiddlers.template.html $TW5_BUILD_OUTPUT/alltiddlers.html text/plain \ - --rendertiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \ - --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \ + --rendertiddler $:/editions/tw5.com/download-empty empty.html text/plain \ + --rendertiddler $:/editions/tw5.com/download-empty empty.hta text/plain \ + --savetiddler $:/green_favicon.ico static/favicon.ico \ + --rendertiddler $:/core/templates/static.template.html static.html text/plain \ + --rendertiddler $:/core/templates/alltiddlers.template.html alltiddlers.html text/plain \ + --rendertiddler $:/core/templates/static.template.css static/static.css text/plain \ + --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain \ || exit 1 # encrypted.html: a version of the main file encrypted with the password "password" @@ -54,8 +55,9 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/tw5.com \ --verbose \ + --output $TW5_BUILD_OUTPUT \ --password password \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/encrypted.html text/plain \ + --rendertiddler $:/core/save/all encrypted.html text/plain \ || exit 1 # tahoelafs.html: empty wiki with plugin for Tahoe-LAFS @@ -63,7 +65,8 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/tahoelafs \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/tahoelafs.html text/plain \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all tahoelafs.html text/plain \ || exit 1 # d3demo.html: wiki to demo d3 plugin @@ -71,7 +74,8 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/d3demo \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/d3demo.html text/plain \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all d3demo.html text/plain \ || exit 1 # codemirrordemo.html: wiki to demo codemirror plugin @@ -79,7 +83,8 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/codemirrordemo \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/codemirrordemo.html text/plain \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all codemirrordemo.html text/plain \ || exit 1 # markdowndemo.html: wiki to demo markdown plugin @@ -87,7 +92,8 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/markdowndemo \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/markdowndemo.html text/plain \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all markdowndemo.html text/plain \ || exit 1 # highlightdemo.html: wiki to demo highlight plugin @@ -95,7 +101,8 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/highlightdemo \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/highlightdemo.html text/plain \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all highlightdemo.html text/plain \ || exit 1 # Run the test edition to run the Node.js tests and to generate test.html for tests in the browser diff --git a/core/language/en-GB/Help/output.tid b/core/language/en-GB/Help/output.tid index f84955722..527b52f2e 100644 --- a/core/language/en-GB/Help/output.tid +++ b/core/language/en-GB/Help/output.tid @@ -1,10 +1,10 @@ title: $:/language/Help/output description: Set the base output directory for subsequent commands -Sets the base output directory for subsequent commands. The default output directory is the current working directory. +Sets the base output directory for subsequent commands. The default output directory is the `output` subdirectory of the edition directory. ``` --output ``` -If the specified pathname is relative then it is resolved relative to the current output directory. +If the specified pathname is relative then it is resolved relative to the current working directory. diff --git a/core/language/en-GB/Help/rendertiddler.tid b/core/language/en-GB/Help/rendertiddler.tid index 393165e4c..70db526f2 100644 --- a/core/language/en-GB/Help/rendertiddler.tid +++ b/core/language/en-GB/Help/rendertiddler.tid @@ -7,4 +7,6 @@ Render an individual tiddler as a specified ContentType, defaults to `text/html` --rendertiddler <filename> [<type>] ``` +By default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory. + Any missing directories in the path to the filename are automatically created. diff --git a/core/language/en-GB/Help/rendertiddlers.tid b/core/language/en-GB/Help/rendertiddlers.tid index 01d95d39b..158872f23 100644 --- a/core/language/en-GB/Help/rendertiddlers.tid +++ b/core/language/en-GB/Help/rendertiddlers.tid @@ -13,4 +13,6 @@ For example: --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain ``` +By default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory. + Any files in the target directory are deleted. The target directory is recursively created if it is missing. diff --git a/core/language/en-GB/Help/savetiddler.tid b/core/language/en-GB/Help/savetiddler.tid index 8764d7037..da86126e6 100644 --- a/core/language/en-GB/Help/savetiddler.tid +++ b/core/language/en-GB/Help/savetiddler.tid @@ -7,4 +7,6 @@ Saves an individual tiddler in its raw text or binary format to the specified fi --savetiddler <title> <filename> ``` +By default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory. + Any missing directories in the path to the filename are automatically created. diff --git a/core/modules/commander.js b/core/modules/commander.js index 381eb24e5..8cf0d0b0b 100644 --- a/core/modules/commander.js +++ b/core/modules/commander.js @@ -26,7 +26,7 @@ var Commander = function(commandTokens,callback,wiki,streams) { this.callback = callback; this.wiki = wiki; this.streams = streams; - this.outputPath = process.cwd(); + this.outputPath = path.resolve($tw.boot.wikiPath,$tw.config.wikiOutputSubDir); }; /* diff --git a/core/modules/commands/output.js b/core/modules/commands/output.js index 819e817ab..0532f58d7 100644 --- a/core/modules/commands/output.js +++ b/core/modules/commands/output.js @@ -29,7 +29,7 @@ Command.prototype.execute = function() { if(this.params.length < 1) { return "Missing output path"; } - this.commander.outputPath = path.resolve(this.commander.outputPath,this.params[0]); + this.commander.outputPath = path.resolve(process.cwd(),this.params[0]); return null; }; diff --git a/editions/tw5.com/tiddlers/Release 5.0.11beta.tid b/editions/tw5.com/tiddlers/Release 5.0.11beta.tid new file mode 100644 index 000000000..0f94028f2 --- /dev/null +++ b/editions/tw5.com/tiddlers/Release 5.0.11beta.tid @@ -0,0 +1,31 @@ +created: 20140426170234142 +modified: 20140426170234142 +tags: releasenote +title: Release 5.0.11-beta +type: text/vnd.tiddlywiki + +//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.10-beta...v5.0.11-beta]]// + +!! Incompatible Changes + +See [[Notes for upgrading to 5.0.11-beta]] for more details of these changes: + +* The default output location for command line operations has changed to the `/output` folder within the TiddlyWikiFolder (it used to be current directory). + +Commands when [[Using TiddlyWiki on Node.js]] + +!! Documentation Improvements + +* + +!! Usability Improvements + +* + +!! Hackability Improvements + +* + +!! Bug Fixes + +* diff --git a/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.11-beta.tid b/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.11-beta.tid new file mode 100644 index 000000000..7c80a09bb --- /dev/null +++ b/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.11-beta.tid @@ -0,0 +1,23 @@ +created: 20140426170234142 +modified: 20140426170234142 +tags: howto +title: Notes for upgrading to 5.0.11-beta +type: text/vnd.tiddlywiki + +Version 5.0.11-beta includes some changes that can break content from earlier releases of ~TiddlyWiki 5. + +! Command line changes + +Previously, commands that generate output files would interpret the specified path to the file as being relative to the current working directory. So, for example, the following command would write `index.html` to the current directory: + +``` +tiddlywiki mywiki --rendertiddler $:/core/save/all index.html text/plain +``` + +In 5.0.11-beta this behaviour has changed, and now the specified filename is resolved relative to an `output` folder within the TiddlyWikiFolder. So the command above will now write the file `index.html` to `mywiki/output/index.html`. + +You can override this behaviour with the OutputCommand. For example, to generate the `index.html` file within the current directory: + +``` +tiddlywiki mywiki --output . --rendertiddler $:/core/save/all index.html text/plain +``` diff --git a/ginsu.cmd b/ginsu.cmd index 2b0221915..c4f3b7d1e 100644 --- a/ginsu.cmd +++ b/ginsu.cmd @@ -2,14 +2,11 @@ rem Split the tiddlers out of a TiddlyWiki file -setlocal enableextensions -mkdir tmp\ginsu -setlocal disableextensions - node .\tiddlywiki.js ^ .\editions\empty ^ --verbose ^ --load %1 ^ - --rendertiddler $:/core/templates/split-recipe tmp\ginsu\split.recipe text/plain ^ - --rendertiddlers [!is[system]] $:/core/templates/tid-tiddler tmp\ginsu text/plain .tid ^ + --output tmp ^ + --rendertiddlers [!is[system]] $:/core/templates/tid-tiddler ginsu text/plain .tid ^ + --rendertiddler $:/core/templates/split-recipe ginsu\split.recipe text/plain ^ || exit 1 diff --git a/ginsu.sh b/ginsu.sh index b83c7913a..2c9b35c1e 100755 --- a/ginsu.sh +++ b/ginsu.sh @@ -2,13 +2,11 @@ # Split the tiddlers out of a TiddlyWiki file -mkdir -p tmp -mkdir -p tmp/ginsu - node ./tiddlywiki.js \ ./editions/empty \ --verbose \ --load $1 \ - --rendertiddler $:/core/templates/split-recipe tmp/ginsu/split.recipe text/plain \ - --rendertiddlers [!is[system]] $:/core/templates/tid-tiddler tmp/ginsu text/plain .tid \ + --output tmp \ + --rendertiddlers [!is[system]] $:/core/templates/tid-tiddler ginsu text/plain .tid \ + --rendertiddler $:/core/templates/split-recipe ginsu/split.recipe text/plain \ || exit 1 diff --git a/qbld.cmd b/qbld.cmd index f554ac73f..4eb772b3b 100644 --- a/qbld.cmd +++ b/qbld.cmd @@ -22,6 +22,7 @@ rem index.html: the main file, including content node .\tiddlywiki.js ^ .\editions\tw5.com ^ --verbose ^ - --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\index.html text/plain ^ - --savetiddler $:/favicon.ico %TW5_BUILD_OUTPUT%\favicon.ico ^ + --output %TW5_BUILD_OUTPUT% ^ + --rendertiddler $:/core/save/all index.html text/plain ^ + --savetiddler $:/favicon.ico favicon.ico ^ || exit 1 diff --git a/qbld.sh b/qbld.sh index d327b264b..cd6c96000 100755 --- a/qbld.sh +++ b/qbld.sh @@ -25,6 +25,7 @@ echo "tiddlywiki.com" > $TW5_BUILD_OUTPUT/CNAME node ./tiddlywiki.js \ ./editions/tw5.com \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/index.html text/plain \ - --savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all index.html text/plain \ + --savetiddler $:/favicon.ico favicon.ico \ || exit 1 diff --git a/tankbld.cmd b/tankbld.cmd index ca492ad65..efd038b9d 100644 --- a/tankbld.cmd +++ b/tankbld.cmd @@ -4,16 +4,13 @@ rem build the Tank edition of TiddlyWiki rem See https://tank.peermore.com -rem Create the tmp directory if needed - -mkdir tmp - rem Open the tank edition in TW5 and save the template for the main HTML file node .\tiddlywiki.js ^ editions\tw5tank ^ --verbose ^ - --rendertiddler $:/core/save/all tmp\app.html text/plain ^ + --output tmp ^ + --rendertiddler $:/core/save/all app.html text/plain ^ || exit 1 rem Prepend the type information that TiddlyWeb needs to turn the .html file into a .tid file diff --git a/tankbld.sh b/tankbld.sh index 9b70854e3..8a3107ec5 100755 --- a/tankbld.sh +++ b/tankbld.sh @@ -4,16 +4,13 @@ # See https://tank.peermore.com -# Create the tmp directory if needed - -mkdir -p tmp - # Open the tank edition in TW5 and save the template for the main HTML file node ./tiddlywiki.js \ editions/tw5tank \ --verbose \ - --rendertiddler $:/core/save/all tmp/app.html text/plain \ + --output tmp \ + --rendertiddler $:/core/save/all app.html text/plain \ || exit 1 # Prepend the type information that TiddlyWeb needs to turn the .html file into a .tid file diff --git a/test.cmd b/test.cmd index d35452d5b..f5a3085eb 100644 --- a/test.cmd +++ b/test.cmd @@ -19,6 +19,7 @@ rem Run the test edition to run the node.js tests and to generate test.html for node .\tiddlywiki.js ^ .\editions\test ^ + --output %TW5_BUILD_OUTPUT% ^ --verbose ^ - --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\test.html text/plain ^ + --rendertiddler $:/core/save/all test.html text/plain ^ || exit 1 diff --git a/test.sh b/test.sh index 474ea8152..00036cd7d 100755 --- a/test.sh +++ b/test.sh @@ -20,5 +20,6 @@ echo "Using TW5_BUILD_OUTPUT as [$TW5_BUILD_OUTPUT]" node ./tiddlywiki.js \ ./editions/test \ --verbose \ - --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/test.html text/plain \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all test.html text/plain \ || exit 1 diff --git a/wbld.cmd b/wbld.cmd index 3a7b04526..31c028d39 100644 --- a/wbld.cmd +++ b/wbld.cmd @@ -6,16 +6,13 @@ rem of a member of the tw5tiddlyweb space rem usage: rem .\wbld.cmd <tiddlyspace username> <tiddlyspace password> -rem Create the tmp directory if needed - -mkdir tmp - rem Open the tw5tiddlyweb edition in TW5 and save the template for the main HTML file node .\tiddlywiki.js ^ editions\tw5tiddlyweb ^ --verbose ^ - --rendertiddler $:/core/save/all tmp\tiddlyweb.html text/plain ^ + --output tmp ^ + --rendertiddler $:/core/save/all tiddlyweb.html text/plain ^ || exit 1 rem Prepend the type information that TiddlyWeb needs to turn the .html file into a .tid file diff --git a/wbld.sh b/wbld.sh index 16225eef3..a50ba3042 100755 --- a/wbld.sh +++ b/wbld.sh @@ -15,7 +15,8 @@ mkdir -p tmp node ./tiddlywiki.js \ editions/tw5tiddlyweb \ --verbose \ - --rendertiddler $:/core/save/all tmp/tiddlyweb.html text/plain \ + --output tmp \ + --rendertiddler $:/core/save/all tiddlyweb.html text/plain \ || exit 1 # Prepend the type information that TiddlyWeb needs to turn the .html file into a .tid file