Skip to content

Commit

Permalink
docs(create-rsbuild): update README (#3323)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Aug 30, 2024
1 parent 1e338b1 commit a03b2b0
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 26 deletions.
19 changes: 17 additions & 2 deletions packages/create-rsbuild/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@
<a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild
# create-rsbuild

The Rspack-based build tool. It's fast, out-of-the-box and extensible.
Create a new Rsbuild project.

Using `npm create`:

```bash
npm create rsbuild@latest
```

Using CLI flags:

```bash
npx create-rsbuild --dir my-project --template react

# Using abbreviations
npx create-rsbuild -d my-project -t react
```

## Documentation

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 @@ -32,7 +32,7 @@
"typescript": "^5.5.2"
},
"dependencies": {
"create-rstack": "1.0.0"
"create-rstack": "1.0.1"
},
"engines": {
"node": ">=16.7.0"
Expand Down
24 changes: 5 additions & 19 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion website/docs/en/guide/advanced/env-vars.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ If several of the above files exist at the same time, they will all be loaded, w

### Env Mode

Rsbuild also supports reading `.env.[mode]` and `.env.[mode].local` files. You can specify the env mode using the `--env-mode <mode>` CLI option.
Rsbuild also supports reading `.env.[mode]` and `.env.[mode].local` files. You can specify the env mode using the `--env-mode <mode>` flag.

For example, set the env mode as `test`:

Expand Down
4 changes: 2 additions & 2 deletions website/docs/en/guide/start/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ If you need to create a project in the current directory, you can set the target

### Quick Creation

`create-rsbuild` provides some CLI options. By setting these CLI options, you can skip the interactive selection steps and create the project with one command.
[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.

For example, to create a React project in the `my-project` directory with one command:

Expand All @@ -102,7 +102,7 @@ npx create-rsbuild --dir my-project --template react
npx create-rsbuild -d my-project -t react
```

The complete CLI options for `create-rsbuild` are as follows:
All the CLI flags of `create-rsbuild`:

```text
Usage: create-rsbuild [options]
Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/guide/start/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Biome 提供与 ESLint 和 Prettier 相似的代码检查和格式化功能。

### 快速创建

`create-rsbuild` 提供了一些 CLI 选项。通过设置这些 CLI 选项,你可以跳过交互式的选择步骤,一键创建项目。
[create-rsbuild](https://www.npmjs.com/package/create-rsbuild) 提供了一些 CLI 选项。通过设置这些 CLI 选项,你可以跳过交互式的选择步骤,一键创建项目。

比如,一键创建 React 项目到 `my-project` 目录:

Expand Down

0 comments on commit a03b2b0

Please sign in to comment.