From 1491c261f5f2b6eb04d97e04c8dafbde8b978428 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 20 Dec 2013 15:29:53 +0000 Subject: [PATCH] Add quick build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For testing it’s handy to be able to build index.html quickly --- qbld.cmd | 27 +++++++++++++++++++++++++++ qbld.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 qbld.cmd create mode 100755 qbld.sh diff --git a/qbld.cmd b/qbld.cmd new file mode 100644 index 000000000..f554ac73f --- /dev/null +++ b/qbld.cmd @@ -0,0 +1,27 @@ +@echo off + +rem Abbreviated version of bld.sh for quicker builds + +rem Set up the build output directory + +if "x%TW5_BUILD_OUTPUT%" == "x" ( + set TW5_BUILD_OUTPUT=..\jermolene.github.com +) + +if not exist %TW5_BUILD_OUTPUT%\nul ( + echo A valid TW5_BUILD_OUTPUT environment variable must be set + exit 1 +) + +echo Using TW5_BUILD_OUTPUT as %TW5_BUILD_OUTPUT% +echo. + +rem The tw5.com wiki +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 ^ + || exit 1 diff --git a/qbld.sh b/qbld.sh new file mode 100755 index 000000000..d327b264b --- /dev/null +++ b/qbld.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Abbreviated version of bld.sh for quicker builds + +# Set up the build output directory + +if [ -z "$TW5_BUILD_OUTPUT" ]; then + TW5_BUILD_OUTPUT=../jermolene.github.com +fi + +if [ ! -d "$TW5_BUILD_OUTPUT" ]; then + echo 'A valid TW5_BUILD_OUTPUT environment variable must be set' + exit 1 +fi + +echo "Using TW5_BUILD_OUTPUT as [$TW5_BUILD_OUTPUT]" + +# Make the CNAME file that GitHub Pages requires + +echo "tiddlywiki.com" > $TW5_BUILD_OUTPUT/CNAME + +# The tw5.com wiki +# 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 \ + || exit 1