From ad6fd6990107f99aebe3d1484c4d9fb487df672a Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 4 Nov 2025 23:15:34 +0800 Subject: [PATCH 1/4] docs(quick-start): update non-interactive mode section --- website/docs/en/guide/start/quick-start.mdx | 12 ++++++------ website/docs/zh/guide/start/quick-start.mdx | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/website/docs/en/guide/start/quick-start.mdx b/website/docs/en/guide/start/quick-start.mdx index 1529f324304c..f128fa9689fc 100644 --- a/website/docs/en/guide/start/quick-start.mdx +++ b/website/docs/en/guide/start/quick-start.mdx @@ -55,19 +55,19 @@ Run the following command to create an Rspack CLI project: Then follow the prompts in your terminal. -### Quick creation +### Non-interactive mode -[create-rspack](https://www.npmjs.com/package/create-rspack) and [create-rsbuild](https://www.npmjs.com/package/create-rsbuild) provides some CLI flags. By setting these CLI flags, you can skip the interactive selection steps and create the project with one command. +[create-rspack](https://www.npmjs.com/package/create-rspack) and [create-rsbuild](https://www.npmjs.com/package/create-rsbuild) provides several CLI options. With these options, you can skip interactive prompts and create an app directly in non-interactive mode. -For example, to create a React project in the `my-project` directory with one command: +For example, the following command creates a React app in the `my-app` directory: ```bash # Rspack CLI -npx create-rspack --dir my-project --template react +npx -y create-rspack --dir my-project --template react # Rsbuild -npx create-rsbuild --dir my-project --template react +npx -y create-rsbuild --dir my-project --template react # Using abbreviations -npx create-rsbuild -d my-project -t react +npx -y create-rsbuild -d my-project -t react ``` ## Online examples diff --git a/website/docs/zh/guide/start/quick-start.mdx b/website/docs/zh/guide/start/quick-start.mdx index 7183625856f7..e7ad69af24f0 100644 --- a/website/docs/zh/guide/start/quick-start.mdx +++ b/website/docs/zh/guide/start/quick-start.mdx @@ -55,19 +55,19 @@ Rspack CLI 是对标 webpack CLI 的工具,提供基础的 `serve` 和 `build` 然后按照提示操作。 -### 快速创建 +### 非交互模式 -[create-rspack](https://www.npmjs.com/package/create-rspack) 和 [create-rsbuild](https://www.npmjs.com/package/create-rsbuild) 提供了一些 CLI 选项。通过设置这些 CLI 选项,你可以跳过交互式的选择步骤,一键创建项目。 +[create-rspack](https://www.npmjs.com/package/create-rspack) 和 [create-rsbuild](https://www.npmjs.com/package/create-rsbuild) 提供了一些 CLI 选项。通过这些选项,你可以跳过交互式提示,直接以非交互模式创建应用。 -比如,一键创建 React 项目到 `my-project` 目录: +例如,以下命令将在 `my-app` 目录中创建一个 React 应用: ```bash # Rspack CLI -npx create-rspack --dir my-project --template react +npx -y create-rspack --dir my-project --template react # Rsbuild -npx create-rsbuild --dir my-project --template react +npx -y create-rsbuild --dir my-project --template react # 使用缩写 -npx create-rsbuild -d my-project -t react +npx -y create-rsbuild -d my-project -t react ``` ## 在线示例 From 2c0adaea57247d99b528bcef59c923d3f85f0d85 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 5 Nov 2025 10:29:59 +0800 Subject: [PATCH 2/4] fix --- website/docs/en/guide/start/quick-start.mdx | 6 +++--- website/docs/zh/guide/start/quick-start.mdx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/website/docs/en/guide/start/quick-start.mdx b/website/docs/en/guide/start/quick-start.mdx index f128fa9689fc..9aa021e91219 100644 --- a/website/docs/en/guide/start/quick-start.mdx +++ b/website/docs/en/guide/start/quick-start.mdx @@ -63,11 +63,11 @@ For example, the following command creates a React app in the `my-app` directory ```bash # Rspack CLI -npx -y create-rspack --dir my-project --template react +npx -y create-rspack --dir my-app --template react # Rsbuild -npx -y create-rsbuild --dir my-project --template react +npx -y create-rsbuild --dir my-app --template react # Using abbreviations -npx -y create-rsbuild -d my-project -t react +npx -y create-rsbuild -d my-app -t react ``` ## Online examples diff --git a/website/docs/zh/guide/start/quick-start.mdx b/website/docs/zh/guide/start/quick-start.mdx index e7ad69af24f0..087c1c5fcc34 100644 --- a/website/docs/zh/guide/start/quick-start.mdx +++ b/website/docs/zh/guide/start/quick-start.mdx @@ -63,11 +63,11 @@ Rspack CLI 是对标 webpack CLI 的工具,提供基础的 `serve` 和 `build` ```bash # Rspack CLI -npx -y create-rspack --dir my-project --template react +npx -y create-rspack --dir my-app --template react # Rsbuild -npx -y create-rsbuild --dir my-project --template react +npx -y create-rsbuild --dir my-app --template react # 使用缩写 -npx -y create-rsbuild -d my-project -t react +npx -y create-rsbuild -d my-app -t react ``` ## 在线示例 From 9c83d0b1646175fa4628cc13192fcd7d7a6e2789 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 5 Nov 2025 14:31:51 +0800 Subject: [PATCH 3/4] docs --- website/docs/en/guide/start/quick-start.mdx | 4 +++- website/docs/zh/guide/start/quick-start.mdx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/website/docs/en/guide/start/quick-start.mdx b/website/docs/en/guide/start/quick-start.mdx index 9aa021e91219..93ab1d878fd1 100644 --- a/website/docs/en/guide/start/quick-start.mdx +++ b/website/docs/en/guide/start/quick-start.mdx @@ -57,15 +57,17 @@ Then follow the prompts in your terminal. ### Non-interactive mode -[create-rspack](https://www.npmjs.com/package/create-rspack) and [create-rsbuild](https://www.npmjs.com/package/create-rsbuild) provides several CLI options. With these options, you can skip interactive prompts and create an app directly in non-interactive mode. +[create-rspack](https://www.npmjs.com/package/create-rspack) and [create-rsbuild](https://www.npmjs.com/package/create-rsbuild) support a non-interactive mode through command-line options. This mode lets you skip all prompts and create a project directly, which is useful for scripts, CI, and coding agents. For example, the following command creates a React app in the `my-app` directory: ```bash # Rspack CLI npx -y create-rspack --dir my-app --template react + # Rsbuild npx -y create-rsbuild --dir my-app --template react + # Using abbreviations npx -y create-rsbuild -d my-app -t react ``` diff --git a/website/docs/zh/guide/start/quick-start.mdx b/website/docs/zh/guide/start/quick-start.mdx index 087c1c5fcc34..95c1db623bc4 100644 --- a/website/docs/zh/guide/start/quick-start.mdx +++ b/website/docs/zh/guide/start/quick-start.mdx @@ -57,7 +57,7 @@ Rspack CLI 是对标 webpack CLI 的工具,提供基础的 `serve` 和 `build` ### 非交互模式 -[create-rspack](https://www.npmjs.com/package/create-rspack) 和 [create-rsbuild](https://www.npmjs.com/package/create-rsbuild) 提供了一些 CLI 选项。通过这些选项,你可以跳过交互式提示,直接以非交互模式创建应用。 +[create-rspack](https://www.npmjs.com/package/create-rspack) 和 [create-rsbuild](https://www.npmjs.com/package/create-rsbuild) 支持通过命令行选项进入非交互模式。使用该模式可以跳过所有提示,直接创建项目,适合脚本、CI 以及 coding agents 等自动化场景。 例如,以下命令将在 `my-app` 目录中创建一个 React 应用: From eb71105db4249c00b63d58994a7826758bc149b1 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 5 Nov 2025 14:32:16 +0800 Subject: [PATCH 4/4] fix --- website/docs/en/guide/start/quick-start.mdx | 3 ++- website/docs/zh/guide/start/quick-start.mdx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/website/docs/en/guide/start/quick-start.mdx b/website/docs/en/guide/start/quick-start.mdx index 93ab1d878fd1..e6c7b740b86f 100644 --- a/website/docs/en/guide/start/quick-start.mdx +++ b/website/docs/en/guide/start/quick-start.mdx @@ -102,7 +102,8 @@ Update your build scripts to use Rspack CLI: { "scripts": { "dev": "rspack dev", - "build": "rspack build" + "build": "rspack build", + "preview": "rspack preview" } } ``` diff --git a/website/docs/zh/guide/start/quick-start.mdx b/website/docs/zh/guide/start/quick-start.mdx index 95c1db623bc4..1223e75bed95 100644 --- a/website/docs/zh/guide/start/quick-start.mdx +++ b/website/docs/zh/guide/start/quick-start.mdx @@ -100,7 +100,8 @@ npm init -y { "scripts": { "dev": "rspack dev", - "build": "rspack build" + "build": "rspack build", + "preview": "rspack preview" } } ```