PackFormatter/README.md

25 lines
1.3 KiB
Markdown
Raw Normal View History

2024-05-30 10:04:54 +00:00
## Pack Formatter
To use this, you must have the [Bun runtime](https://bun.sh) installed. Simply run `bun install`, `bun compile`, and you'll find the `build-packs` binary in the `dist` folder.
## Usage
```sh
build-packs
```
### Arguments
* `-i` or `--indir` - The input directory. Defaults to the current working directory.
* `-o` or `--outdir` - The directory to output the compiled packs to. Defaults to dist.
2024-05-30 19:11:45 +00:00
* `-d` or `--data` - The data directory containing the data files. Defailts to data.
2024-05-30 10:04:54 +00:00
* `-r` or `--revision` - The revision/version. Defaults to `git rev-parse --short HEAD` if .git exists, else required.
2024-05-30 19:11:45 +00:00
* `-i` or `--info` - The info file. Defaults to info.json.
2024-05-30 10:08:27 +00:00
### Info File
An `info.json` file should be present in the input directory. This file should contain the following fields:
* `name` - The name of the pack.
* `description` - A description of the pack.
* `url` - The URL to the pack's repository.
* `versions` - A two dimensional array of mc version to pack format. (`[[mcVersion, packFormat]]`)
* `exports` - The exports to be made from the zip files produced for each version. A two dimensional array of mcVersion or "all". (`[["all"],["1.20", "1.20.2"]]`)
2024-05-30 19:14:36 +00:00
* `overrides` - An object of properties to override per version. (`{"1.20": {"data": "common"} }`)
* `data` - The data directory to use for this version. Superceeds the global data directory.