add docs for watch & clean cli command

This commit is contained in:
Moritz Hölting 2024-06-12 22:25:46 +02:00
parent c5b9897f6c
commit 98654e4deb
2 changed files with 38 additions and 6 deletions

View File

@ -26,12 +26,46 @@ Options:
## build ## build
Build the project at the specified path to the `dist` folder. Build the project at the specified path to the `dist` folder.
```bash ```bash
shulkerscript build [PATH] shulkerscript build [OPTIONS] [PATH]
``` ```
- `PATH`: The path to the directory where the project is located. Defaults to the current directory. - `PATH`: The path to the directory where the project is located. Defaults to the current directory.
Options:
- `--output <OUTPUT>` The output directory, overrides the `DATAPACK_DIR` environment variable
Environment variables:
- `DATAPACK_DIR` The output directory [default: `./dist`]
## package ## package
Build and package the project at the specified path to a `.zip` file. Build and package the project at the specified path to a `.zip` file.
```bash ```bash
shulkerscript package [PATH] shulkerscript package [OPTIONS] [PATH]
``` ```
- `PATH`: The path to the directory where the project is located. Defaults to the current directory.
Options & Environment:
- Same as `build`
## watch
```bash
shulkerscript watch [OPTIONS] [SUBCOMMAND]
```
- `SUBCOMMAND`: The command to run when changes have been detected, has to be either `build` or `package` [default: `build`]
Options:
- `--no-initial` Do not run the command initially
- `--debounce-time <DEBOUNCE_TIME>` The time to wait in ms after the last change before running the command [default: `2000`]
## clean
Clean the output directory of the project at the specified path.
```bash
shulkerscript clean [OPTIONS] [PATH]
```
- `PATH`: The path of the project folder to clean [default: `.`]
Options:
- `--output <OUTPUT>` The output directory, overrides the `DATAPACK_DIR` environment variable
Environment variables:
- `DATAPACK_DIR` The output directory [default: `./dist`]

View File

@ -25,9 +25,7 @@ import { Steps } from '@astrojs/starlight/components';
3. **Tag support**\ 3. **Tag support**\
Add a way to define tags in the project and use them in the code. Add a way to define tags in the project and use them in the code.
This will eliminate the need for providing tags in the asset directory. This will eliminate the need for providing tags in the asset directory.
4. **CLI watch subcommand**\ 4. **Variables & Constants**\
Add a watch subcommand to the CLI that will watch the project directory for changes and automatically compile the project.
5. **Variables & Constants**\
Add support for variables and constants. Constants can be any type (string, number, etc.) and Add support for variables and constants. Constants can be any type (string, number, etc.) and
can be passed from function to function. They will be processed by the compiler. Variables will be can be passed from function to function. They will be processed by the compiler. Variables will be
mutable and can be changed at any time, and are stored as entries in minecraft scoreboards. mutable and can be changed at any time, and are stored as entries in minecraft scoreboards.