mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 16:54:08 +02:00
add some developer documentation
This commit is contained in:
parent
3398027ad2
commit
d973bca0b3
4 changed files with 86 additions and 1 deletions
|
|
@ -23,3 +23,4 @@ worktrees
|
||||||
config
|
config
|
||||||
stdin
|
stdin
|
||||||
stdout
|
stdout
|
||||||
|
direnv
|
||||||
|
|
|
||||||
80
DEVELOPING.md
Normal file
80
DEVELOPING.md
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
# Developing
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
### Nix based development environment
|
||||||
|
|
||||||
|
The recommended way to setup the development environment is to use
|
||||||
|
[Lix](https://lix.systems/install/)/[Nix](https://nixos.org/download/).
|
||||||
|
|
||||||
|
Once installed, you can enter the development shell using `nix develop` or,
|
||||||
|
setup [direnv](https://direnv.net/) to automatically enter the development shell
|
||||||
|
when you enter the folder.
|
||||||
|
|
||||||
|
The development shell provides all necessary tooling to develop haze.
|
||||||
|
|
||||||
|
### Without Nix
|
||||||
|
|
||||||
|
The fooling tools need to be setup to develop without using Nix to manage the
|
||||||
|
development setup:
|
||||||
|
|
||||||
|
- [`cargo`](https://doc.rust-lang.org/cargo/getting-started/installation.html) -
|
||||||
|
For building the program
|
||||||
|
- [`mdbook`](https://github.com/rust-lang/mdBook) - For building the
|
||||||
|
documentation
|
||||||
|
- [`prettier`](https://prettier.io/) - For formatting the non-rust files
|
||||||
|
- [`vale`](https://vale.sh/) - For checking documentation
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo build
|
||||||
|
```
|
||||||
|
|
||||||
|
The binary can then be found at `target/debug/haze`.
|
||||||
|
|
||||||
|
## Formatting
|
||||||
|
|
||||||
|
### With Nix
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix fmt
|
||||||
|
```
|
||||||
|
|
||||||
|
### Without Nix
|
||||||
|
|
||||||
|
#### Rust code
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo fmt
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Documentation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
prettier --write '**/*.md'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building documentation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mdbook serve
|
||||||
|
```
|
||||||
|
|
||||||
|
### Checking documentation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
vale src/ book/src/ book/README.md *.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run all checks
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix flake check
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building docker images
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix run .#'"haze-image-php-8.4"'.copyToDockerDaemon
|
||||||
|
```
|
||||||
|
|
@ -35,3 +35,7 @@ Documentation for haze can be found in the
|
||||||
- Navigate to the address that is provided in the output.
|
- Navigate to the address that is provided in the output.
|
||||||
|
|
||||||
See the [book](https://icewind.codeberg.page/haze/) for more details.
|
See the [book](https://icewind.codeberg.page/haze/) for more details.
|
||||||
|
|
||||||
|
## Developing
|
||||||
|
|
||||||
|
See [DEVELOPING.md](./DEVELOPING.md) for information on how to work on `haze`.
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
checks = {
|
checks = {
|
||||||
vale = {vale, ...}: "${vale}/bin/vale src/ book/src/ CHANGELOG.md README.md book/README.md";
|
vale = {vale, ...}: "${vale}/bin/vale src/ book/src/ book/README.md *.md";
|
||||||
};
|
};
|
||||||
|
|
||||||
homeModules = {
|
homeModules = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue