Johannes Neyer 47e9597aec cli: Allow setting an output directory
This allows setting an output directory with a new `--output-path` argument.

The following command writes the output file to `build/test.pdf`. If the `build`
directory does not exist yet, it is created.

```sh
typst compile -fpdf --output-path build test.typ
```

The following also writes the output file to `build/test.pdf`.

```sh
typst compile -fpdf --output-path build src/test.typ
```

When an absolute path to an output file is specified the `--output-path`
argument is ignored:

```sh
typst compile -fpdf --output-path build test.typ /tmp/test.pdf
```
2025-02-19 14:58:22 +01:00
..