Skip to content

Commit 7d37150

Browse files
authored
docs: patch necessary changes (#725)
1 parent dedfc5e commit 7d37150

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

website/docs/en/guide/solution/nodejs.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Rslib offers seamless support for Node.js projects, allowing you to build Node.j
2525

2626
For example, in `rslib.config.ts`:
2727

28-
```ts
28+
```ts title="rslib.config.ts"
2929
import { defineConfig } from '@rslib/core';
3030

3131
export default defineConfig({
@@ -62,9 +62,9 @@ All Node.js [built-in modules](https://nodejs.org/docs/latest/api/) are external
6262

6363
### Shims
6464

65-
- `global`: leave it as it is, while it's recommended to use[globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) instead.
66-
- `__filename`: When outputting in ESM format, replace`__filename` with the result of`fileURLToPath(import.meta.url)`.
67-
- `__dirname`: When outputting in ESM format, replace`__dirname` with the result of`dirname(fileURLToPath(import.meta.url))`.
65+
- `global`: leave it as it is, while it's recommended to use [globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) instead.
66+
- `__filename`: When outputting in ESM format, replace `__filename` with the result of `fileURLToPath(import.meta.url)`.
67+
- `__dirname`: When outputting in ESM format, replace `__dirname` with the result of `dirname(fileURLToPath(import.meta.url))`.
6868

6969
{/* TODO: Rspack doesn't support createRequire now */}
7070
{/* ### createRequire */}

website/docs/en/guide/start/quick-start.mdx

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

33
## Setup environment
44

5-
Before getting started, you will need to install [Node.js](https://nodejs.org/) >= version 16. We recommend using the Node.js LTS version.
5+
Before getting started, you will need to install [Node.js](https://nodejs.org/) >= version 16, it is recommended to use the Node.js LTS version.
66

77
Check the current Node.js version with the following command:
88

99
```bash
1010
node -v
1111
```
1212

13-
If you do not have Node.js installed in your current environment, or the installed version is too low, you can use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) to install.
13+
If you do not have Node.js installed in current environment, or the installed version is too low, you can use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) to install.
1414

1515
Here is an example of how to install via nvm:
1616

@@ -81,7 +81,7 @@ We're working to provide templates for more frameworks (such as Vue).
8181
```
8282

8383
:::tip
84-
Biome provides combined linting and formatting features. If you select Biome, you typically won't need ESLint or Prettier.
84+
Biome provides similar linting and formatting features to ESLint and Prettier. If you select Biome, you typically won't need to choose ESLint or Prettier as well.
8585
:::
8686

8787
### Current directory
@@ -100,7 +100,7 @@ If you need to create a project in the current directory, you can set the target
100100

101101
### Quick creation
102102

103-
[create-rslib](https://www.npmjs.com/package/create-rslib) provides command-line options / flags. By setting these CLI flags, you can skip the interactive selection steps and create the project with one command.
103+
[create-rslib](https://www.npmjs.com/package/create-rslib) provides some CLI flags. By setting these CLI flags, you can skip the interactive selection steps and create the project with one command.
104104

105105
For example, to create an example project in the `my-project` directory with one command:
106106

@@ -111,7 +111,7 @@ npx create-rslib --dir my-project --template example
111111
npx create-rslib -d my-project -t example
112112
```
113113

114-
Current flags for `create-rslib`:
114+
All the CLI flags of `create-rslib`:
115115

116116
```text
117117
Usage: create-rslib [options]
@@ -136,7 +136,7 @@ To migrate from an existing project to Rslib, refer to the following guides:
136136

137137
For other types of projects, you can manually install the [@rslib/core](https://www.npmjs.com/package/@rslib/core) package:
138138

139-
`<PackageManagerTabs command="add @rslib/core -D" />`
139+
<PackageManagerTabs command="add @rslib/core -D" />
140140

141141
Then refer to the guide and documentation to enable the features you need:
142142

0 commit comments

Comments
 (0)