chore: several doc fixes and enhancements (#110)

* docs: update instructions for development flow
* feat: add devenv profile for nix/devenv environment setup
* chore: update .gitignore to ignore stage-tamagotchi-tauri fonts
* docs: add instructions to use devenv
* docs: fix note asides
* fix: missing bracket
* chore: ignore devenv related files
* chore: update ignore pattern
* chore: update .gitignore to include a newline at the end

---------

Co-authored-by: 藍+85CD <50108258+kwaa@users.noreply.github.com>
This commit is contained in:
Chatnoir Miki
2025-04-02 17:32:33 +08:00
committed by GitHub
co-authored by 藍+85CD
parent 9a90d12c6b
commit 483f3df351
2 changed files with 112 additions and 84 deletions
+9
View File
@@ -32,6 +32,7 @@ coverage/
**/public/assets/vrm/models/*
packages/stage-ui/public/assets/fonts/
apps/stage-tamagotchi/public/assets/fonts/
apps/stage-tamagotchi-tauri/public/assets/fonts/
apps/stage-web/public/assets/fonts/
*.pcm
@@ -40,3 +41,11 @@ apps/stage-web/public/assets/fonts/
*.mp3
twitter-session.json
# Make it easy for devenv users to override their local environment.
# See: https://github.com/moeru-ai/airi/pull/110#discussion_r2024378953
.direnv
.pre-commit-config.yaml
.envrc
.devenv*
devenv.*
@@ -74,9 +74,9 @@ Hello! Thank you for your interest in contributing to this project. This guide w
## If you have already contributed to this project before
> [!WARNING]
>
> If you haven't clone this repository, skip this section.
:::caution
If you haven't clone this repository, skip this section.
:::
Make sure your local repository is up to date with the upstream repository:
@@ -117,65 +117,72 @@ corepack enable
pnpm install
```
> [!NOTE]
>
> We would recommend to install [@antfu/ni](https://github.com/antfu-collective/ni) to make your script simpler.
>
> ```shell
> corepack enable
> npm i -g @antfu/ni
> ```
>
> Once installed, you can
>
> - use `ni` for `pnpm install`, `npm install` and `yarn install`.
> - use `nr` for `pnpm run`, `npm run` and `yarn run`.
>
> You don't need to care about the package manager, `ni` will help you choose the right one.
:::note
We would recommend to install [@antfu/ni](https://github.com/antfu-collective/ni) to make your script simpler.
```shell
corepack enable
npm i -g @antfu/ni
```
Once installed, you can
- use `ni` for `pnpm install`, `npm install` and `yarn install`.
- use `nr` for `pnpm run`, `npm run` and `yarn run`.
You don't need to care about the package manager, `ni` will help you choose the right one.
:::
## Choose the application you want to develop on
### Documentation site
```shell
pnpm -F @proj-airi/docs... dev
pnpm -F @proj-airi/docs dev
```
> [!NOTE]
>
> For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
>
> ```shell
> nr -F @proj-airi/docs... dev
> ```
:::note
For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
```shell
nr -F @proj-airi/docs dev
```
:::
### Stage web (Frontend for [airi.moeru.ai](https://airi.moeru.ai), or [airi.ayaka.io](https://airi.ayaka.io))
```shell
pnpm -F @proj-airi/stage-web... dev
pnpm -F @proj-airi/stage-web dev
```
> [!NOTE]
>
> For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
>
> ```shell
> nr -F @proj-airi/stage-web... dev
> ```
:::note
For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
```shell
nr -F @proj-airi/stage-web dev
```
:::
### Stage Tamagotchi (Electron app for アイリ VTuber)
```shell
pnpm -F @proj-airi/stage-tamagotchi... dev
pnpm -F @proj-airi/stage-tamagotchi dev
```
> [!NOTE]
>
> For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
>
> ```shell
> nr -F @proj-airi/stage-tamagotchi... dev
> ```
:::note
For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
```shell
nr -F @proj-airi/stage-tamagotchi dev
```
:::
### Telegram bot integration
@@ -213,13 +220,15 @@ Run the bot
pnpm -F @proj-airi/telegram-bot start
```
> [!NOTE]
>
> For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
>
> ```shell
> nr -F @proj-airi/telegram-bot... dev
> ```
:::note
For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
```shell
nr -F @proj-airi/telegram-bot dev
```
:::
### Discord bot integration
@@ -247,13 +256,15 @@ Run the bot
pnpm -F @proj-airi/discord-bot start
```
> [!NOTE]
>
> For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
>
> ```shell
> nr -F @proj-airi/discord-bot dev
> ```
:::note
For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
```shell
nr -F @proj-airi/discord-bot dev
```
:::
### Minecraft agent
@@ -283,33 +294,39 @@ Run the bot
pnpm -F @proj-airi/minecraft-bot start
```
> [!NOTE]
>
> For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
>
> ```shell
> nr -F @proj-airi/minecraft-bot dev
> ```
:::note
For [@antfu/ni](https://github.com/antfu-collective/ni) users, you can
```shell
nr -F @proj-airi/minecraft-bot dev
```
:::
## Commit
### Before commit
> [!CAUTION]
>
> Please make sure lint (static checkers) and TypeScript compilers are satisfied:
>
> ```shell
> pnpm packages:stub && pnpm lint && pnpm typecheck
> ```
:::caution
> [!NOTE]
>
> If you have [@antfu/ni](https://github.com/antfu-collective/ni) installed, you can use `nr` to run the commands:
>
> ```shell
> nr packages:stub && nr lint && nr typecheck
> ```
Please make sure lint (static checkers) and TypeScript compilers are satisfied:
```shell
pnpm packages:stub && pnpm lint && pnpm typecheck
```
:::
:::note
If you have [@antfu/ni](https://github.com/antfu-collective/ni) installed, you can use `nr` to run the commands:
```shell
nr packages:stub && nr lint && nr typecheck
```
:::
### Commit
@@ -326,13 +343,15 @@ git push origin <your-branch-name> -u
You should be able to browse the branch on your fork repository.
> [!NOTE]
>
> If this is your first time contributing with this project, you need to add the upstream repository too:
>
> ```shell
> git remote add upstream https://github.com/moeru-ai/airi.git
> ```
:::note
If this is your first time contributing with this project, you need to add the upstream repository too:
```shell
git remote add upstream https://github.com/moeru-ai/airi.git
```
:::
## Creating Pull Request