Skip to content

Commit a7ac36d

Browse files
committed
docs: revert unnecessary wording changes
1 parent dab0a3c commit a7ac36d

24 files changed

Lines changed: 113 additions & 115 deletions

website/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,24 @@
22

33
This website is built with [Rspress](https://rspress.rs/) through Rstack CLI.
44

5-
The documentation source lives in `docs` and is written in Markdown or MDX.
5+
Documentation can be written with Markdown or MDX.
66

77
## Development
88

9-
Start the development server from the repository root:
9+
Run the development server from the repository root:
1010

1111
```bash
1212
pnpm doc
1313
```
1414

15-
Alternatively, run the website scripts from this directory:
15+
Build or preview the website from this directory:
1616

1717
```bash
18-
pnpm dev
1918
pnpm build
2019
pnpm preview
2120
```
2221

2322
## Contributing
2423

25-
Keep corresponding English and Chinese pages aligned in structure, meaning,
26-
links, and examples. When a translated heading would generate a different
27-
anchor, add an explicit anchor that matches the English heading.
24+
The website provides English and Chinese documentation. Keep both versions in
25+
sync when possible.

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# API reference
22

3-
Rstack exposes a unified configuration API and dedicated entry points for the public APIs of Rsbuild, Rslib, Rstest, and Rslint. Prefer these entry points over direct imports from each tool's core package so that import paths and tool versions stay aligned with Rstack.
3+
Rstack 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 and tool versions remain aligned with Rstack.
44

55
## Import paths
66

@@ -19,11 +19,11 @@ Rstack exposes a unified configuration API and dedicated entry points for the pu
1919

2020
### `define`
2121

22-
Import `define` from `rstack` to register tool configurations in `rstack.config.ts`. For details, see [Configuration APIs](./configuration#configuration-apis).
22+
Import `define` from `rstack` to register tool configurations in `rstack.config.ts`; see [Configuration APIs](./configuration#configuration-apis) for details.
2323

2424
## Re-exports
2525

26-
Each tool-specific subpath re-exports the public APIs of its corresponding core package.
26+
The tool-specific subpaths below re-export the public APIs from their corresponding core packages. Using these Rstack entry points keeps dependency entry points and tool versions aligned with the toolchain integrated by Rstack.
2727

2828
### `rstack/app`
2929

@@ -53,7 +53,7 @@ For details, see the [Rslib core APIs](https://rslib.rs/api/javascript-api/core)
5353
import { describe, expect, test } from 'rstack/test';
5454
```
5555

56-
For test APIs, see the [Rstest runtime API](https://rstest.rs/api/runtime-api/). For configuration helpers, see the [Rstest core APIs](https://rstest.rs/api/javascript-api/rstest-core).
56+
See the [Rstest runtime API](https://rstest.rs/api/runtime-api/) for test APIs and the [Rstest core APIs](https://rstest.rs/api/javascript-api/rstest-core) for configuration helpers.
5757

5858
> For more guidance on testing, see [Testing](./testing).
5959
@@ -69,7 +69,7 @@ For details about the available presets and plugins, see [Rslint rules and prese
6969

7070
## TypeScript types
7171

72-
The following type-only entry points add ambient declarations to a TypeScript project. Add only the entries your project needs to [`compilerOptions.types`](https://www.typescriptlang.org/tsconfig/#types) in `tsconfig.json`.
72+
These type-only entry points add ambient declarations to a TypeScript project. Add only the entries your project needs to [`compilerOptions.types`](https://www.typescriptlang.org/tsconfig/#types) in `tsconfig.json`.
7373

7474
### `rstack/types`
7575

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Examples:
2020
# Write output files to the output directory
2121
rs build --dist-path output
2222

23-
# Generate source maps for output files
23+
# Generate source maps for the output files
2424
rs build --source-map
2525

2626
# Rebuild when files change

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Examples:
2020
# Start the server and open the page in the browser
2121
rs dev --open
2222

23-
# Use port 8080 and exit if it is already in use
23+
# Use port 8080 and fail if it is already in use
2424
rs dev --port 8080 --strict-port
2525

2626
# Make the server available on the local network

website/docs/en/guide/cli/doc.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

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

5-
The `rs doc` command uses [Rspress](https://rspress.rs/guide/start/introduction) to develop, build, and locally preview a documentation site.
5+
The `rs doc` command uses [Rspress](https://rspress.rs/guide/start/introduction) to develop, build, and preview a documentation site.
66

7-
[`@rspress/core`](https://www.npmjs.com/package/@rspress/core) is an optional dependency. Install it before using `rs doc`:
7+
Install [`@rspress/core`](https://www.npmjs.com/package/@rspress/core) before using the command:
88

99
<PackageManagerTabs command="install -D @rspress/core" />
1010

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# lint
22

3-
The `rs lint` command uses [Rslint](https://rslint.rs/guide/) to lint source files.
3+
The `rs lint` command uses [Rslint](https://rslint.rs/guide/) to lint source code.
44

55
## Usage
66

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# preview
22

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

55
## Usage
66

77
```bash
88
rs preview [options]
99
```
1010

11-
The command loads the application configuration registered with [`define.app()`](../configuration#define-app). Before starting the preview server, run [`rs build`](./build) to generate the production output:
11+
The command loads the application configuration registered with [`define.app()`](../configuration#define-app). Run [`rs build`](./build) before starting the preview server to generate the production output:
1212

1313
```bash
1414
rs build
@@ -27,7 +27,7 @@ Examples:
2727
# Start the preview server and open the page in the browser
2828
rs preview --open
2929

30-
# Use port 8080 and exit if it is already in use
30+
# Use port 8080 and fail if it is already in use
3131
rs preview --port 8080 --strict-port
3232

3333
# Make the preview server available on the local network

website/docs/en/guide/cli/staged.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# staged
22

3-
The `rs staged` command uses [lint-staged](https://github.com/lint-staged/lint-staged) to run tasks against files staged for commit.
3+
The `rs staged` command uses [lint-staged](https://github.com/lint-staged/lint-staged) to run tasks against files staged in Git.
44

5-
It is typically used in a Git hook to lint, format, or otherwise check files before a commit.
5+
A common use case is to run linters, formatters, or other checks on staged files before committing code.
66

77
## Usage
88

@@ -16,7 +16,7 @@ The command loads the staged-file tasks registered with [`define.staged()`](../c
1616

1717
### `--allow-empty`
1818

19-
`--allow-empty` allows the commit to proceed if tasks revert all staged changes.
19+
`--allow-empty` allows an empty commit when tasks revert all staged changes.
2020

2121
```bash
2222
rs staged --allow-empty

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

5-
> For more guidance on testing, see [Testing](../testing).
5+
For more guidance on testing, see [Testing](../testing).
66

77
## Usage
88

website/docs/en/guide/configuration.mdx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configuration
22

3-
Rstack centralizes your project's tool configurations in one file. Register only the configurations your project needs with the `define.*()` APIs.
3+
Rstack centralizes the configuration for your project's tools in a single file. Define only the configurations your project needs with the `define.*()` APIs.
44

55
## Configuration file
66

@@ -24,7 +24,7 @@ define.lint({
2424

2525
The configuration file does not require a default export. Each `define.*()` API can be called at most once; defining the same configuration type more than once throws an error.
2626

27-
By default, Rstack looks for any of the following files in the project root:
27+
By default, Rstack looks for a file with one of the following names:
2828

2929
- `rstack.config.ts`
3030
- `rstack.config.js`
@@ -39,9 +39,9 @@ rs build --config ./configs/rstack.config.ts
3939

4040
## Loading dependencies on demand
4141

42-
Before running a tool, Rstack loads and executes the configuration file. It then resolves only the configuration functions required by that command.
42+
Every `rs` command loads and executes the Rstack configuration file, then resolves only the configuration functions needed by that command.
4343

44-
When a configuration uses a tool-specific plugin or dependency, define it as an async function and load that dependency with dynamic `import()` inside the function. This defers loading until the configuration is needed.
44+
When a configuration needs to import plugins or other tool-specific dependencies, use an async configuration function and load those dependencies with dynamic `import()` inside it. This ensures that they are loaded only when the configuration is resolved.
4545

4646
```ts title="rstack.config.ts"
4747
import { define } from 'rstack';
@@ -57,7 +57,7 @@ define.app(async () => {
5757

5858
## Configuration APIs
5959

60-
Each API accepts the configuration format of its underlying tool. When using APIs and helpers re-exported by Rstack, import them from the `rstack/app`, `rstack/lib`, `rstack/test`, and `rstack/lint` entry points.
60+
Configuration options follow the formats of the underlying tools. When using APIs and helpers that Rstack re-exports, prefer the `rstack/app`, `rstack/lib`, `rstack/test`, and `rstack/lint` entry points.
6161

6262
| API | Tool | Commands |
6363
| ----------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
@@ -70,7 +70,7 @@ Each API accepts the configuration format of its underlying tool. When using API
7070

7171
### `define.app()` \{#define-app}
7272

73-
Defines the [Rsbuild configuration](https://rsbuild.rs/config/) for an application. It accepts a configuration object or a configuration function. The function receives the same configuration parameters as Rsbuild.
73+
Defines the [Rsbuild configuration](https://rsbuild.rs/config/) for an application. It accepts a configuration object or a configuration function. The function receives the standard Rsbuild configuration parameters.
7474

7575
```ts title="rstack.config.ts"
7676
import { define } from 'rstack';
@@ -89,7 +89,7 @@ define.app({
8989

9090
### `define.lib()` \{#define-lib}
9191

92-
Defines the [Rslib configuration](https://rslib.rs/config/) for a library. It accepts a configuration object or a configuration function. The function receives the same configuration parameters as Rslib.
92+
Defines the [Rslib configuration](https://rslib.rs/config/) for a library. It accepts a configuration object or a configuration function. The function receives the standard Rslib configuration parameters.
9393

9494
```ts title="rstack.config.ts"
9595
import { define } from 'rstack';
@@ -106,7 +106,7 @@ define.lib({
106106

107107
### `define.doc()` \{#define-doc}
108108

109-
Defines the [Rspress configuration](https://rspress.rs/api/config/config-basic) for a documentation site. It accepts either a configuration object or an async configuration function.
109+
Defines the [Rspress configuration](https://rspress.rs/api/config/config-basic) for a documentation site. It accepts a configuration object or an async configuration function.
110110

111111
```ts title="rstack.config.ts"
112112
import { define } from 'rstack';
@@ -117,15 +117,15 @@ define.doc({
117117
});
118118
```
119119

120-
`@rspress/core` is an optional peer dependency of Rstack. Install it in each project that runs `rs doc`:
120+
`@rspress/core` is an optional dependency of Rstack. Install it in every project that uses the `rs doc` command:
121121

122122
```bash
123123
pnpm add -D @rspress/core
124124
```
125125

126126
### `define.test()` \{#define-test}
127127

128-
Defines the [Rstest configuration](https://rstest.rs/config/). It accepts either a configuration object or a configuration function.
128+
Defines the [Rstest configuration](https://rstest.rs/config/). It accepts a configuration object or a configuration function.
129129

130130
```ts title="rstack.config.ts"
131131
import { define } from 'rstack';
@@ -140,15 +140,15 @@ define.test({
140140
});
141141
```
142142

143-
When `extends` is omitted, Rstack uses the Rsbuild adapter to inherit the configuration from `define.app()`. If no application configuration is registered, it uses the Rslib adapter to inherit `define.lib()` instead. `define.app()` takes precedence when both are registered. Set `extends` explicitly to opt out of automatic inheritance.
143+
When `extends` is omitted, Rstack automatically connects the test configuration to `define.app()` through the Rsbuild adapter. If no application configuration is defined, it falls back to `define.lib()` through the Rslib adapter. The application configuration takes precedence when both are defined. Set `extends` explicitly to opt out of this automatic inheritance.
144144

145-
If the root test configuration contains `projects` and does not define `extends`, each inline project without its own `extends` inherits the same application or library configuration. A function-based configuration is resolved once and shared by those projects. String entries are passed to Rstest unchanged, so their external configurations load independently and do not inherit the current application or library configuration.
145+
If the root test configuration does not define `extends` and contains `projects`, Rstack applies automatic inheritance to each inline project that omits its own `extends`. A function-based application or library configuration is resolved once and shared by those projects. String project entries are passed to Rstest unchanged; they load their external configurations independently and do not inherit the current application or library configuration.
146146

147147
> For more guidance on testing, see [Testing](./testing).
148148
149149
### `define.lint()` \{#define-lint}
150150

151-
Defines the [Rslint configuration](https://rslint.rs/config/). Pass a configuration directly, or use an async function to load presets and plugins from `rstack/lint` on demand.
151+
Defines the [Rslint configuration](https://rslint.rs/config/). Pass the configuration directly, or use an async function to load presets and plugins from `rstack/lint` on demand.
152152

153153
```ts title="rstack.config.ts"
154154
import { define } from 'rstack';
@@ -162,7 +162,7 @@ define.lint(async () => {
162162

163163
### `define.staged()` \{#define-staged}
164164

165-
Defines the [lint-staged configuration](https://github.com/lint-staged/lint-staged#configuration) for files staged in Git. It accepts either an object that maps glob patterns to tasks or a task-generator function. Tasks can be commands, command arrays, or functions supported by lint-staged.
165+
Defines the [lint-staged configuration](https://github.com/lint-staged/lint-staged#configuration) used to run tasks on staged Git files. It accepts either an object that maps glob patterns to tasks or a task-generator function. Tasks can be commands, command arrays, or functions supported by lint-staged.
166166

167167
```ts title="rstack.config.ts"
168168
import { define } from 'rstack';
@@ -172,4 +172,4 @@ define.staged({
172172
});
173173
```
174174

175-
Unlike the other tool commands, `rs staged` requires a `define.staged()` configuration and exits with an error when it is missing.
175+
Unlike the other commands, `rs staged` requires a `define.staged()` configuration and reports an error when it is missing.

0 commit comments

Comments
 (0)