5 releases (3 breaking)
|0.6.0||Sep 26, 2021|
|0.5.1||Sep 26, 2021|
|0.5.0||Feb 21, 2020|
|0.4.0||May 6, 2019|
|0.1.0||Feb 13, 2019|
#69 in #task
A deliberately minimal task runner.
This is an in-progress-pre-alpha project.
Rhiz executes tasks defined in a "Rhizfile" which contains task descriptions with a Lisp-like syntax.
(task "hello" (log "Rhiz says hello")) ;; Comments start with a semicolon (task "fizzbuzz" "Tasks can have an optional description" ;; Strings with spaces are double-quoted. (exec fizzbuzz.exe) (log "The fizz was buzzed")) (task "clean" (delete "./output")) ("task" echo ("echo" "Bare words and quoted strings are equivalent")))
Tasks are executed relative to the directory containing the
the directory where
rhiz is invoked. When
rhiz is invoked.
The commands in a task are executed one after the other, and if a command returns a non-zero exit code the the Rhiz immediately exits.
Prints a message to the standard output. Takes a single argument, which should be a string.
Executes an external command (
npm, etc.) in the Rhizfile's directory (usually the project root).
Takes one or more argument(s). The arguments are converted to strings; the first should be the name of an external program; the remainder should be it's arguments. They're executed using.
Ensure a directory exists and is empty. Takes a single argument, which should be the path to a directory (relative to the Rhizfile).
If the directory exists, it's contents are deleted. Otherwise, it's created.
Delete a file. It takes a single argument, which should be a file name or path (relative to the Rhizfile).
If the file indicated by the path exists it's delete with
fs::remove_fileIf the file doesn't exist, this command is ignored.
Copy a file. Takes two arguments: the source and destination paths for the copy.
The source should be the path to a file (relative to the Rhizfile). The destination can be a path to a directory (in which case the source file is copied there with the same name) or to a new file (in which case it's copied with the new name). If the destination file already exists, this command exits with an error.
The copy is performed using
Recursively copies a directory. Takes to arguments: the source and destination paths for the copy.
Both the source and target directories should exist. The files and directories in the source are copied into the target.
Execute commands in parallel. Takes any number of tasks (written as s-expressions) as arguments.