3. Tasks

There are 3 types of tasks in Termite, shell, cp and server

3.1. Shell tasks

Shell tasks accepts 3 options, Command (Mandatory), Cwd (Optional) and watch.

3.1.1. Command (Mandatory)

Specifies the command to run. Is also possible specify a list of commands. In this case, the commands are run sequentially.

3.1.2. Cwd (Optional)

The current directory will be changed to cwd before the command is executed.

3.1.3. Watch (Optional)

List of files to watch for modifications. After any change, the command is executed again. It is possible to use shell-style wildcards (* or **). It is also possible specify folders to watch, in this case /some/path/ and /some/path/** have the same effect. If watch is omitted, the command is run only once.

3.2. Cp tasks

Copy files is a very common operation, thats the reason have a task for this operation, although would we possible to use a command task for copy files. For cp tasks there are 3 options, Source (Mandatory), Dest (Mandatory) and watch.

3.2.1. Source (Mandatory)

A file, or list of files to copy. Shell-style wildcards are allowed.

3.2.2. Dest (Mandatory)

Where copy the file or files. Should be a folder, if doesn’t exist is created. Be careful, files are overwritten without any warning.

3.2.3. Watch (Optional)

Specifies if the source files should be monitored. It is boolean value, by default the value is set to False.

3.3. Server task

This task start an HTTP server. If you are watching any files, your browser is automatically refreshed after every change. Has only one option, Path (Mandatory).

3.3.1. Path (Mandatory)

Serves files from this directory.