docs: update contributing

This commit is contained in:
pengzhanbo 2025-03-27 21:57:29 +08:00
parent 9f99ae3ca7
commit 6b390dbd95
2 changed files with 14 additions and 8 deletions

View File

@ -2,7 +2,8 @@
## Overview
The project repository uses [pnpm workspaces](https://pnpm.io/zh/workspaces) to implement a [Monorepo](https://en.wikipedia.org/wiki/Monorepo), which stores multiple interrelated independent Packages.
The project repository uses [pnpm workspaces](https://pnpm.io/zh/workspaces) to implement
a [Monorepo](https://en.wikipedia.org/wiki/Monorepo), which stores multiple interrelated independent Packages.
- The theme is developed and maintained in the `theme` directory.
- Plugins are developed and maintained in the `plugins` directory.
@ -11,7 +12,6 @@ The project repository uses [pnpm workspaces](https://pnpm.io/zh/workspaces) to
In the `plugins` directory:
- `plugin-search`: Provides full-text fuzzy search functionality for the theme.
- `plugin-shikiji`: A code highlighting plugin that supports highlight, diff, focus, and error level.
- `plugin-md-power`: Provides enhanced markdown features.
## Development Configuration
@ -43,15 +43,20 @@ pnpm build
#### `pnpm build`
The `build` command uses `tsc` to compile the source code into `.js` files in the `lib` directory. It also copies resources that do not need to be compiled to the corresponding `lib` directory.
The `build` command uses `tsc` to compile the source code into `.js` files in the `lib` directory.
It also copies resources that do not need to be compiled to the corresponding `lib` directory.
After cloning the repository, you need to run this command first to ensure that the project code can run smoothly, as the compiled output directory is excluded from the repository by `.gitignore`.
After cloning the repository, you need to run this command first to ensure that the project code
can run smoothly, as the compiled output directory is excluded from the repository by `.gitignore`.
#### `pnpm dev`
The `dev` command starts two services locally. One runs the `tsup:watch & copy:watch` for the `theme` directory, and the other runs the `vuepress` development service for the example `docs` directory.
The `dev` command starts two services locally. One runs the `tsup:watch & copy:watch` for
the `theme` directory, and the other runs the `vuepress` development service for the example `docs` directory.
By default, all plugins under the `plugins` directory do not have a `dev` command. Therefore, changes to the `plugins` directory may require running the `pnpm build` command to rebuild. Some changes to the `plugins/**/node` directory require re-running `pnpm dev` to take effect.
By default, all plugins under the `plugins` directory do not have a `dev` command.
Therefore, changes to the `plugins` directory may require running the `pnpm build` command to rebuild.
Some changes to the `plugins/**/node` directory require re-running `pnpm dev` to take effect.
#### `pnpm lint`
@ -65,4 +70,6 @@ The `test` command uses Vitest to run all tests.
### IDE Support
It is recommended to use `vs code` for development. This repository is configured with the recommended `vs code` extensions for developing this theme. When you import this repository, `vs code` may recommend that you install some extensions.
It is recommended to use `vs code` for development. This repository is configured with
the recommended `vs code` extensions for developing this theme. When you import this repository,
`vs code` may recommend that you install some extensions.

View File

@ -12,7 +12,6 @@
`plugins` 目录中:
- `plugin-search`: 为主题提供 全文模糊搜索 功能
- `plugin-shikiji`: 代码高亮插件,支持 highlight、diff、focus、error level
- `plugin-md-power`: 提供 markdown 增强功能
## 开发配置