Node:Tutorial, Next:, Previous:Overview, Up:Top



Tutorial

This tutorial describes how Transbuild is used to build a Web site. It will describe the process step-by-step, building the site up from scratch and showing how the main features of Transbuild can be used.

You will find the tutorial files under the test/tutorial directory. Each step has its own build script file, and you can run it with a command like the following:

$ cd test/tutorial
$ transbuild -a -f tb-step01.xml

The -f option is used to specify the build script file to use. If it is not specified, the program will try to look for a file named Transbuild.xml in the current directory. In this tutorial, the build script files will not be called this, so you will need to explicitly specify it with the -f option.

The -a option tells Transbuild to build every file. Normally, Transbuild will only build a target file if doesn't exist or its corresponding source file is newer. This dependency checking can speed up rebuilds. However, it is not flawless: it fails to detect changes to associated files (the annotation files described later), changes to the XSLT scripts, and changes to the build script itself. During this tutorial, most of the changes will be to the XSLT scripts and the build script, so you will need to use the -a option to ensure that the target files are updated.

Each step will produce a target tree in the same directory called target. You might want to delete the target directory between runs, so that old files do not clutter up the target tree. You can specify a different target directory with the -T option. For example:

$ transbuild -a -f tb-step02.xml -T target02