Skip to content

Commit fbc35ad

Browse files
authored
docs: add descriptions to command and API references (#543)
1 parent c99afe6 commit fbc35ad

18 files changed

Lines changed: 72 additions & 0 deletions

‎website/docs/en/guide/api-reference.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: 'Public Rstack APIs, including configuration helpers, tool API re-exports, and TypeScript declarations.'
3+
---
4+
15
# API reference
26

37
Rstack CLI provides a unified configuration API and re-exports the public APIs of Rsbuild, Rslib, Rstest, and Rslint through dedicated subpaths. Prefer these subpaths to direct imports from each tool's core package so that dependency entry points stay unified and APIs match the tool versions integrated by Rstack CLI.

‎website/docs/en/guide/cli/build.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: 'Build applications for production with rs build and configure Rsbuild output through define.app().'
3+
---
4+
15
# build
26

37
The `rs build` command uses [Rsbuild](https://rsbuild.rs/guide/basic/cli#rsbuild-build) to build an application for production.

‎website/docs/en/guide/cli/dev.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: 'Start the Rsbuild dev server with rs dev, including HMR, host and port options, and define.app() configuration.'
3+
---
4+
15
# dev
26

37
The `rs dev` command starts the [Rsbuild development server](https://rsbuild.rs/guide/basic/server) for an application. It compiles the source code in development mode, watches for changes, and applies hot module replacement (HMR) or reloads the page as needed.

‎website/docs/en/guide/cli/fmt.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: 'Format files or check formatting with rs fmt, including file selection, ignore rules, caching, and stdin input.'
3+
---
4+
15
# fmt
26

37
The `rs fmt` command formats files or checks whether they are formatted. For detailed usage, see [Formatting](../formatting).

‎website/docs/en/guide/cli/lib.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: 'Build and develop libraries with rs lib, including build, inspect, and mf-dev commands.'
3+
---
4+
15
# lib
26

37
The `rs lib` command uses [Rslib](https://rslib.rs/guide/basic/cli#rslib) to build library outputs.

‎website/docs/en/guide/cli/lint.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: 'Lint source code with rs lint, apply automatic fixes, run type checking, and configure presets through define.lint().'
3+
---
4+
15
# lint
26

37
The `rs lint` command uses [Rslint](https://rslint.rs/guide/) to lint source code.

‎website/docs/en/guide/cli/preview.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: 'Preview an application production build locally with rs preview after running rs build.'
3+
---
4+
15
# preview
26

37
The `rs preview` command uses [Rsbuild](https://rsbuild.rs/guide/basic/cli#rsbuild-preview) to preview an application's production build locally.

‎website/docs/en/guide/cli/test.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: 'Run Rstest through rs test, including test execution, watch mode, filtering, and coverage.'
3+
---
4+
15
# test
26

37
The `rs test` command uses [Rstest](https://rstest.rs/guide/basic/cli) to run tests.

‎website/docs/en/guide/configuration.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: 'Configure Rstack tools with define APIs in rstack.config.ts, including application builds, tests, linting, and formatting.'
3+
---
4+
15
# Configuration
26

37
import { PackageManagerTabs } from '@rspress/core/theme';

‎website/docs/zh/guide/api-reference.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: 'Rstack 公共 API,包括配置辅助方法、各工具重新导出的 API 和 TypeScript 类型声明。'
3+
---
4+
15
# API 参考 \{#api-reference}
26

37
Rstack CLI 提供统一的配置 API,并通过专用子路径重导出 Rsbuild、Rslib、Rstest 和 Rslint 的公开 API。建议优先从这些子路径导入,而不是直接从各工具的 core 包导入,以统一依赖入口,并确保 API 与 Rstack CLI 集成的工具版本匹配。

0 commit comments

Comments
 (0)