Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions website/docs/en/guide/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
{
Expand All @@ -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"
{
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/guide/cli/staged.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/guide/cli/test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions website/docs/zh/guide/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
{
Expand All @@ -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"
{
Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/guide/cli/dev.mdx
Original file line number Diff line number Diff line change
@@ -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}

Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/guide/cli/staged.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ rs staged --debug

### `--no-stash`

`--no-stash` 会禁用备份 stash,并在出错时保留任务产生的变更
`--no-stash` 会禁用备份 stash,并在任务失败时跳过自动还原

```bash
rs staged --no-stash
Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/guide/cli/test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down