Skip to content

Commit

Permalink
docs: update contributing guide
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed May 27, 2024
1 parent 528664c commit 2636360
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@

## Overview

This repository employs a [monorepo](https://en.wikipedia.org/wiki/Monorepo) setup with [pnpm workspaces](https://pnpm.io/workspaces), and hosts a number of associated but separated packages.
This repository employs a [monorepo](https://en.wikipedia.org/wiki/Monorepo) setup with [pnpm workspaces](https://pnpm.io/workspaces), and hosts a number of associated but separated packages in the `packages` directory.

In the `packages` directory:
Core packages:

- `bundler-vite`: The VuePress bundler package with vite. Use vite to `dev` and `build` VuePress app that generated by `@vuepress/core`.
- `bundler-webpack`: The VuePress bundler package with webpack. Use webpack to `dev` and `build` VuePress app that generated by `@vuepress/core`.
- `cli`: The VuePress command line interface (CLI) package. It will resolve user config file, and create VuePress app with `@vuepress/core`, then execute corresponding command.
- `client`: The VuePress client package. Provides the client entry, and exports types and composable utils that can be used in client side development.
- `core`: The VuePress core. Provides pure Node API to generate VuePress app, including page handling, plugin system and data preparation.
- `markdown`: The VuePress markdown package. Use `markdown-it` as the markdown parser and integrate some plugins to be used in VuePress.
- `shared`: Utilities that shared between node side and client side.
- `utils`: Utilities that should only be used in node side.

Here are some wrapper packages that use the above packages:
Wrapper of core packages:

- `vuepress`: A wrapper of the above packages, and provides `vuepress` command line tool. Users need to choose and install bundler and theme by themselves.

- `vuepress`: A wrapper the above packages, and provides `vuepress` command line tool. Users need to choose and install bundler and theme by themselves.
Bundler packages:

- `bundler-vite`: The VuePress bundler package with vite. Use vite to `dev` and `build` VuePress app that generated by `@vuepress/core`.
- `bundler-webpack`: The VuePress bundler package with webpack. Use webpack to `dev` and `build` VuePress app that generated by `@vuepress/core`.

## Development Setup

Pre-requirement:

- [Node.js](http://nodejs.org) **version 18.16.0+**
- [pnpm](https://pnpm.io/) **version 8+**
- [pnpm](https://pnpm.io/) **version 9+**

Clone the repo, and install dependencies:

Expand Down
17 changes: 10 additions & 7 deletions CONTRIBUTING_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@

## 概览

项目仓库借助于 [pnpm 工作空间](https://pnpm.io/zh/workspaces) 来实现 [Monorepo](https://en.wikipedia.org/wiki/Monorepo)存放了多个互相关联的独立 Package 。
项目仓库借助于 [pnpm 工作空间](https://pnpm.io/zh/workspaces) 来实现 [Monorepo](https://en.wikipedia.org/wiki/Monorepo)`packages` 目录下存放了多个互相关联的独立 Package 。

`packages` 目录下
Core Packages

- `bundler-vite`: 基于 Vite 的 Bundler 模块。使用 Vite 对 VuePress App 执行 `dev``build` 操作。
- `bundler-webpack`: 基于 Webpack 的 Bundler 模块。使用 Webpack 对 VuePress App 执行 `dev``build` 操作。
- `cli`: 命令行接口 (CLI) 模块。包含解析用户配置文件、调用 `@vuepress/core` 创建 VuePress App 、执行对应命令等功能。
- `client`: Client 模块。包含客户端页面入口,并提供了客户端开发时可以用到的类型和工具函数。
- `core`: Core 模块。提供 Node API 来创建 VuePress App ,包括页面逻辑、插件系统、数据准备等功能。
- `markdown`: Markdown 模块。使用 `markdown-it` 作为 Markdown 解析器,并集成了一些 VuePress 中用到的插件。
- `shared`: 既可以在 Node 端使用、也可以在客户端使用的工具函数模块。
- `utils`: 仅可以在 Node 端使用的工具函数模块。

还有一些对上述 Package 进行封装后的 Package :
Core Packages 的封装:

- `vuepress`: 是上述 Core Packages 的封装,提供了 `vuepress` 命令行工具。用户需要在此包的基础上自行选择并安装打包工具和主题。

- `vuepress`: 是上述包的封装,提供了 `vuepress` 命令行工具。用户需要在此包的基础上自行选择并安装打包工具和主题。
Bundler Packages :

- `bundler-vite`: 基于 Vite 的 Bundler 模块。使用 Vite 对 VuePress App 执行 `dev``build` 操作。
- `bundler-webpack`: 基于 Webpack 的 Bundler 模块。使用 Webpack 对 VuePress App 执行 `dev``build` 操作。

## 开发配置

开发要求:

- [Node.js](http://nodejs.org) **version 18.16.0+**
- [pnpm](https://pnpm.io/zh/) **version 8+**
- [pnpm](https://pnpm.io/zh/) **version 9+**

克隆代码仓库,并安装依赖:

Expand Down

0 comments on commit 2636360

Please sign in to comment.