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
2 changes: 1 addition & 1 deletion e2e/cases/create-rsbuild/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const createAndValidate = async (
const dir = path.join(cwd, name);
await fse.remove(dir);

let command = `node ${CREATE_RSBUILD_BIN_PATH} -d ${name} -t ${template}`;
let command = `node ${CREATE_RSBUILD_BIN_PATH} ${name} -t ${template}`;
if (tools.length) {
const toolsCmd = tools.map((tool) => `--tools ${tool}`).join(' ');
command += ` ${toolsCmd}`;
Expand Down
1 change: 1 addition & 0 deletions e2e/cases/create-rsbuild/tsTemplates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ rspackTest('should create react-ts project as expected', async () => {
expect(pkgJson.dependencies['react-dom']).toBeTruthy();
expect(pkgJson.devDependencies['@rsbuild/plugin-react']).toBeTruthy();
});

rspackTest('should create react18-ts project as expected', async () => {
const { pkgJson } = await createAndValidate(__dirname, 'react18-ts');
expect(pkgJson.dependencies.react.startsWith('^18')).toBeTruthy();
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rsbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"bump": "pnpx bumpp --no-tag"
},
"dependencies": {
"create-rstack": "1.7.1"
"create-rstack": "1.7.3"
},
"devDependencies": {
"@rsbuild/core": "workspace:*",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions website/docs/en/guide/start/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,33 +100,33 @@ To create an application in the current directory, set the target folder to `.`:

### Non-interactive mode

[create-rsbuild](https://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-rsbuild](https://npmjs.com/package/create-rsbuild) supports 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
npx -y create-rsbuild --dir my-app --template react
npx -y create-rsbuild@latest my-app --template react

# Using abbreviations
npx -y create-rsbuild -d my-app -t react
npx -y create-rsbuild@latest my-app -t react

# Specify multiple tools
npx -y create-rsbuild -d my-app -t react --tools eslint --tools prettier
npx -y create-rsbuild@latest my-app -t react --tools eslint --tools prettier
```

All CLI flags supported by `create-rsbuild`:

```
Usage: create-rsbuild [options]
Usage: create-rsbuild [dir] [options]

Options:

-h, --help display help for command
-d, --dir create project in specified directory
-t, --template specify the template to use
--tools select additional tools (biome, eslint, prettier)
--override override files in target directory
--package-name specify the package name
-h, --help display help for command
-d, --dir <dir> create project in specified directory
-t, --template <tpl> specify the template to use
--tools <tool> select additional tools (biome, eslint, prettier)
--override override files in target directory
--packageName <name> specify the package name

Templates:

Expand Down
16 changes: 8 additions & 8 deletions website/docs/zh/guide/start/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Biome 提供与 ESLint 和 Prettier 相似的代码检查和格式化功能。

### 非交互模式

[create-rsbuild](https://npmjs.com/package/create-rsbuild) 提供了一些 CLI 选项。通过这些选项,你可以跳过交互式提示,直接以非交互模式创建应用
[create-rsbuild](https://npmjs.com/package/create-rsbuild) 支持通过命令行选项进入非交互模式。使用该模式可以跳过所有提示,直接创建项目,适合脚本、CI 以及 coding agents 等自动化场景

例如,以下命令将在 `my-app` 目录中创建一个 React 应用:

Expand All @@ -117,16 +117,16 @@ npx -y create-rsbuild -d my-app -t react --tools eslint --tools prettier
`create-rsbuild` 完整的 CLI 选项如下:

```
Usage: create-rsbuild [options]
Usage: create-rsbuild [dir] [options]

Options:

-h, --help display help for command
-d, --dir create project in specified directory
-t, --template specify the template to use
--tools select additional tools (biome, eslint, prettier)
--override override files in target directory
--package-name specify the package name
-h, --help display help for command
-d, --dir <dir> create project in specified directory
-t, --template <tpl> specify the template to use
--tools <tool> select additional tools (biome, eslint, prettier)
--override override files in target directory
--packageName <name> specify the package name

Templates:

Expand Down
Loading