diff --git a/website/README.md b/website/README.md index f2e87ff..634b63b 100644 --- a/website/README.md +++ b/website/README.md @@ -22,5 +22,4 @@ pnpm preview ## Contributing The website provides English and Chinese documentation. Keep both versions in -sync when possible. Placeholder pages marked with `TODO` are ready for future -documentation. +sync when possible. diff --git a/website/docs/en/guide/api-reference.mdx b/website/docs/en/guide/api-reference.mdx index a94dcbb..8c61e7f 100644 --- a/website/docs/en/guide/api-reference.mdx +++ b/website/docs/en/guide/api-reference.mdx @@ -85,7 +85,7 @@ These type-only entry points add ambient declarations to a TypeScript project. A ### `rstack/test/globals` -`rstack/test/globals` declares Rstest APIs such as `test`, `expect`, and lifecycle hooks as globals. Add it when tests use these APIs without explicit imports. +`rstack/test/globals` declares Rstest APIs such as `test`, `expect`, and lifecycle hooks as globals. Add it when Rstest's [`globals`](https://rstest.rs/config/test/globals) option is enabled and tests use these APIs without explicit imports. ```json title="tsconfig.json" { @@ -97,7 +97,7 @@ These type-only entry points add ambient declarations to a TypeScript project. A ### `rstack/test/importMeta` -`rstack/test/importMeta` augments `ImportMeta` with the optional `rstest` property, enabling `import.meta.rstest` in in-source tests. +`rstack/test/importMeta` augments `ImportMeta` with the optional `rstest` property, providing type support for `import.meta.rstest` in in-source tests. ```json title="tsconfig.json" { diff --git a/website/docs/en/guide/cli/staged.mdx b/website/docs/en/guide/cli/staged.mdx index ee377d1..e0e2c29 100644 --- a/website/docs/en/guide/cli/staged.mdx +++ b/website/docs/en/guide/cli/staged.mdx @@ -48,7 +48,7 @@ rs staged --debug ### `--no-stash` -`--no-stash` disables the backup stash and keeps changes made by tasks when an error occurs. +`--no-stash` disables the backup stash and automatic reversion when a task fails. ```bash rs staged --no-stash diff --git a/website/docs/en/guide/cli/test.mdx b/website/docs/en/guide/cli/test.mdx index c1e393f..08f23e2 100644 --- a/website/docs/en/guide/cli/test.mdx +++ b/website/docs/en/guide/cli/test.mdx @@ -65,7 +65,7 @@ rs test merge-reports ### init -[`rs test init`](https://rstest.rs/guide/basic/cli#rstest-init) creates starter files for a supported Rstest project type. +[`rs test init`](https://rstest.rs/guide/basic/cli#rstest-init) initializes an Rstest configuration for a supported project type. ```bash rs test init browser diff --git a/website/docs/zh/guide/api-reference.mdx b/website/docs/zh/guide/api-reference.mdx index af26fea..0f7a2dc 100644 --- a/website/docs/zh/guide/api-reference.mdx +++ b/website/docs/zh/guide/api-reference.mdx @@ -85,7 +85,7 @@ import { js, reactPlugin, ts } from 'rstack/lint'; ### `rstack/test/globals` -`rstack/test/globals` 提供 `test`、`expect` 和生命周期钩子等 Rstest API 的全局声明。测试代码无需显式导入这些 API 时,请添加该入口。 +`rstack/test/globals` 提供 `test`、`expect` 和生命周期钩子等 Rstest API 的全局声明。启用 Rstest 的 [`globals`](https://rstest.rs/zh/config/test/globals) 选项且测试代码不显式导入这些 API 时,请添加该入口。 ```json title="tsconfig.json" { @@ -97,7 +97,7 @@ import { js, reactPlugin, ts } from 'rstack/lint'; ### `rstack/test/importMeta` -`rstack/test/importMeta` 为 `ImportMeta` 增加可选的 `rstest` 属性,使源码内测试可以使用 `import.meta.rstest`。 +`rstack/test/importMeta` 为 `ImportMeta` 增加可选的 `rstest` 属性,为源码内测试中的 `import.meta.rstest` 提供类型支持。 ```json title="tsconfig.json" { diff --git a/website/docs/zh/guide/cli/dev.mdx b/website/docs/zh/guide/cli/dev.mdx index 0f67e73..331ffab 100644 --- a/website/docs/zh/guide/cli/dev.mdx +++ b/website/docs/zh/guide/cli/dev.mdx @@ -1,6 +1,6 @@ # dev -`rs dev` 命令用于启动应用的 [Rsbuild 开发服务器](https://rsbuild.rs/guide/basic/server)。它会以开发模式编译源码、监听文件变化,并按需进行模块热更新(HMR)或刷新页面。 +`rs dev` 命令用于启动应用的 [Rsbuild 开发服务器](https://rsbuild.rs/zh/guide/basic/server)。它会以开发模式编译源码、监听文件变化,并按需进行模块热更新(HMR)或刷新页面。 ## 用法 \{#usage} diff --git a/website/docs/zh/guide/cli/staged.mdx b/website/docs/zh/guide/cli/staged.mdx index b9d2c76..af25e6d 100644 --- a/website/docs/zh/guide/cli/staged.mdx +++ b/website/docs/zh/guide/cli/staged.mdx @@ -48,7 +48,7 @@ rs staged --debug ### `--no-stash` -`--no-stash` 会禁用备份 stash,并在出错时保留任务产生的变更。 +`--no-stash` 会禁用备份 stash,并在任务失败时跳过自动还原。 ```bash rs staged --no-stash diff --git a/website/docs/zh/guide/cli/test.mdx b/website/docs/zh/guide/cli/test.mdx index 469eae7..d4ce4ac 100644 --- a/website/docs/zh/guide/cli/test.mdx +++ b/website/docs/zh/guide/cli/test.mdx @@ -65,7 +65,7 @@ rs test merge-reports ### init -[`rs test init`](https://rstest.rs/zh/guide/basic/cli#rstest-init) 用于为 Rstest 支持的项目类型创建初始文件。 +[`rs test init`](https://rstest.rs/zh/guide/basic/cli#rstest-init) 用于为支持的项目类型初始化 Rstest 配置。 ```bash rs test init browser