You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/en/guide/api-reference.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# API reference
2
2
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.
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.
4
4
5
5
## Import paths
6
6
@@ -19,11 +19,11 @@ Rstack provides a unified configuration API and re-exports the public APIs of Rs
19
19
20
20
### `define`
21
21
22
-
Import`define`from`rstack`toregistertoolconfigurationsin`rstack.config.ts`; see [ConfigurationAPIs](./configuration#configuration-apis)fordetails.
22
+
Import`define`from`rstack`toregistertoolconfigurationsin`rstack.config.ts`. Fordetails, see [ConfigurationAPIs](./configuration#configuration-apis).
23
23
24
24
## Re-exports
25
25
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.
26
+
Each tool-specific subpath re-exports the public APIs of its corresponding core package.
27
27
28
28
### `rstack/app`
29
29
@@ -53,7 +53,7 @@ For details, see the [Rslib core APIs](https://rslib.rs/api/javascript-api/core)
53
53
import { describe, expect, test } from'rstack/test';
54
54
```
55
55
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.
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).
57
57
58
58
> For more guidance on testing, see [Testing](./testing).
59
59
@@ -69,7 +69,7 @@ For details about the available presets and plugins, see [Rslint rules and prese
69
69
70
70
## TypeScript types
71
71
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`.
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`.
73
73
74
74
### `rstack/types`
75
75
@@ -85,7 +85,7 @@ These type-only entry points add ambient declarations to a TypeScript project. A
85
85
86
86
### `rstack/test/globals`
87
87
88
-
`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.
88
+
`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.
89
89
90
90
```json title="tsconfig.json"
91
91
{
@@ -97,7 +97,7 @@ These type-only entry points add ambient declarations to a TypeScript project. A
97
97
98
98
### `rstack/test/importMeta`
99
99
100
-
`rstack/test/importMeta` augments `ImportMeta` with the optional `rstest` property, enabling`import.meta.rstest` in in-source tests.
100
+
`rstack/test/importMeta` augments `ImportMeta` with the optional `rstest` property, providing type support for`import.meta.rstest` in in-source tests.
Copy file name to clipboardExpand all lines: website/docs/en/guide/cli/build.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Examples:
20
20
# Write output files to the output directory
21
21
rs build --dist-path output
22
22
23
-
# Generate source maps for the output files
23
+
# Generate source maps for output files
24
24
rs build --source-map
25
25
26
26
# Rebuild when files change
@@ -29,7 +29,7 @@ rs build --watch
29
29
30
30
## Configuration
31
31
32
-
Configure the production build through[`define.app()`](../configuration#define-app) in the [Rstack configuration file](/guide/configuration#configuration-file). It accepts the standard [Rsbuild configuration](https://rsbuild.rs/config/):
32
+
Configure production builds with[`define.app()`](../configuration#define-app) in `rstack.config.ts`. The API accepts the standard [Rsbuild configuration](https://rsbuild.rs/config/):
Copy file name to clipboardExpand all lines: website/docs/en/guide/cli/dev.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Examples:
20
20
# Start the server and open the page in the browser
21
21
rs dev --open
22
22
23
-
# Use port 8080 and fail if it is already in use
23
+
# Use port 8080 and exit if it is already in use
24
24
rs dev --port 8080 --strict-port
25
25
26
26
# Make the server available on the local network
@@ -29,7 +29,7 @@ rs dev --host
29
29
30
30
## Configuration
31
31
32
-
Configure the development server through[`define.app()`](../configuration#define-app) in the [Rstack configuration file](/guide/configuration#configuration-file). It accepts the standard [Rsbuild configuration](https://rsbuild.rs/config/):
32
+
Configure the development server with[`define.app()`](../configuration#define-app) in `rstack.config.ts`. The API accepts the standard [Rsbuild configuration](https://rsbuild.rs/config/):
[`rs doc eject`](https://rspress.rs/api/commands#rspress-eject) copies a built-in Rspress theme component into the project for customization. Run it without a component name to list all ejectable components.
57
+
[`rs doc eject`](https://rspress.rs/api/commands#rspress-eject) copies a built-in Rspress theme component into the project for customization. Run it without a component name to list the available components.
58
58
59
59
```bash
60
60
rs doc eject
61
61
```
62
62
63
63
## Configuration
64
64
65
-
Configure the documentation site through[`define.doc()`](../configuration#define-doc) in the [Rstack configuration file](/guide/configuration#configuration-file). It accepts the standard [Rspress configuration](https://rspress.rs/api/config/config-basic):
65
+
Configure the documentation site with[`define.doc()`](../configuration#define-doc) in `rstack.config.ts`. The API accepts the standard [Rspress configuration](https://rspress.rs/api/config/config-basic):
Copy file name to clipboardExpand all lines: website/docs/en/guide/cli/lib.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ rs lib mf-dev
44
44
45
45
## Configuration
46
46
47
-
Configure library builds through[`define.lib()`](../configuration#define-lib) in the [Rstack configuration file](/guide/configuration#configuration-file). It accepts the standard [Rslib configuration](https://rslib.rs/config/):
47
+
Configure library builds with[`define.lib()`](../configuration#define-lib) in `rstack.config.ts`. The API accepts the standard [Rslib configuration](https://rslib.rs/config/):
Copy file name to clipboardExpand all lines: website/docs/en/guide/cli/lint.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# lint
2
2
3
-
The `rs lint` command uses [Rslint](https://rslint.rs/guide/) to lint source code.
3
+
The `rs lint` command uses [Rslint](https://rslint.rs/guide/) to lint source files.
4
4
5
5
## Usage
6
6
@@ -29,7 +29,7 @@ rs lint --type-check
29
29
30
30
## Configuration
31
31
32
-
Configure linting through[`define.lint()`](../configuration#define-lint) in the [Rstack configuration file](/guide/configuration#configuration-file). It accepts the standard [Rslint configuration](https://rslint.rs/config/). Presets and plugins can be imported from `rstack/lint` on demand:
32
+
Configure linting with[`define.lint()`](../configuration#define-lint) in `rstack.config.ts`. The API accepts the standard [Rslint configuration](https://rslint.rs/config/). Presets and plugins can be imported from `rstack/lint` on demand:
Copy file name to clipboardExpand all lines: website/docs/en/guide/cli/preview.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# preview
2
2
3
-
The `rs preview` command uses [Rsbuild](https://rsbuild.rs/guide/basic/cli#rsbuild-preview) to preview an application's production build locally.
3
+
The `rs preview` command uses [Rsbuild](https://rsbuild.rs/guide/basic/cli#rsbuild-preview) to preview an application's production output locally.
4
4
5
5
## Usage
6
6
7
7
```bash
8
8
rs preview [options]
9
9
```
10
10
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:
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:
12
12
13
13
```bash
14
14
rs build
@@ -27,7 +27,7 @@ Examples:
27
27
# Start the preview server and open the page in the browser
28
28
rs preview --open
29
29
30
-
# Use port 8080 and fail if it is already in use
30
+
# Use port 8080 and exit if it is already in use
31
31
rs preview --port 8080 --strict-port
32
32
33
33
# Make the preview server available on the local network
@@ -36,7 +36,7 @@ rs preview --host
36
36
37
37
## Configuration
38
38
39
-
Configure the preview server through[`define.app()`](../configuration#define-app) in the [Rstack configuration file](/guide/configuration#configuration-file). It accepts the standard [Rsbuild configuration](https://rsbuild.rs/config/):
39
+
Configure the preview server with[`define.app()`](../configuration#define-app) in `rstack.config.ts`. The API accepts the standard [Rsbuild configuration](https://rsbuild.rs/config/):
Copy file name to clipboardExpand all lines: website/docs/en/guide/cli/staged.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# staged
2
2
3
-
The `rs staged` command uses [lint-staged](https://github.com/lint-staged/lint-staged) to run tasks against files staged in Git.
3
+
The `rs staged` command uses [lint-staged](https://github.com/lint-staged/lint-staged) to run tasks against files staged for commit.
4
4
5
-
A common use case is to run linters, formatters, or other checks on staged files before committing code.
5
+
It is typically used in a Git hook to lint, format, or otherwise check files before a commit.
6
6
7
7
## Usage
8
8
@@ -16,7 +16,7 @@ The command loads the staged-file tasks registered with [`define.staged()`](../c
16
16
17
17
### `--allow-empty`
18
18
19
-
`--allow-empty` allows an empty commit when tasks revert all staged changes.
19
+
`--allow-empty` allows the commit to proceed if tasks revert all staged changes.
20
20
21
21
```bash
22
22
rs staged --allow-empty
@@ -48,7 +48,7 @@ rs staged --debug
48
48
49
49
### `--no-stash`
50
50
51
-
`--no-stash` disables the backup stash and keeps changes made by tasks when an error occurs.
51
+
`--no-stash` disables the backup stash and automatic reversion when a task fails.
52
52
53
53
```bash
54
54
rs staged --no-stash
@@ -88,7 +88,7 @@ rs staged --help
88
88
89
89
## Configuration
90
90
91
-
Configure staged-file tasks through[`define.staged()`](../configuration#define-staged) in the [Rstack configuration file](/guide/configuration#configuration-file). It accepts the standard [lint-staged configuration](https://github.com/lint-staged/lint-staged#configuration):
91
+
Configure staged-file tasks with[`define.staged()`](../configuration#define-staged) in `rstack.config.ts`. The API accepts the standard [lint-staged configuration](https://github.com/lint-staged/lint-staged#configuration):
Copy file name to clipboardExpand all lines: website/docs/en/guide/cli/test.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
The `rs test` command uses [Rstest](https://rstest.rs/guide/basic/cli) to run tests.
4
4
5
-
For more guidance on testing, see [Testing](../testing).
5
+
> For more guidance on testing, see [Testing](../testing).
6
6
7
7
## Usage
8
8
@@ -65,15 +65,15 @@ rs test merge-reports
65
65
66
66
### init
67
67
68
-
[`rs test init`](https://rstest.rs/guide/basic/cli#rstest-init)creates starter files for a supported Rstest project type.
68
+
[`rs test init`](https://rstest.rs/guide/basic/cli#rstest-init)initializes an Rstest configuration for a supported project type.
69
69
70
70
```bash
71
71
rs test init browser
72
72
```
73
73
74
74
## Configuration
75
75
76
-
Configure tests through[`define.test()`](../configuration#define-test) in the [Rstack configuration file](/guide/configuration#configuration-file). It accepts the standard [Rstest configuration](https://rstest.rs/config/):
76
+
Configure tests with[`define.test()`](../configuration#define-test) in `rstack.config.ts`. The API accepts the standard [Rstest configuration](https://rstest.rs/config/):
0 commit comments