Skip to content

Commit

Permalink
docs: update midway tools
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 committed Jul 20, 2023
1 parent 061200a commit 1fb98da
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
20 changes: 19 additions & 1 deletion site/docs/how_to_update_midway.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,19 @@ midway 项目的依赖使用 lerna 发布,**请不要**:
你可以使用下面的命令在项目根目录执行进行检查。

```bash
# 社区用户
$ npx midway-version
# 内部用户
$ tnpx @ali/midway-version
```

如果项目为 pnpm 安装的依赖,请使用下面的命令。

```bash
# 社区用户
$ pnpx midway-version
# 内部用户
$ pnpx @ali/midway-version
```


Expand All @@ -60,30 +66,42 @@ $ pnpx midway-version
你可以使用下面的命令在项目根目录执行进行更新提示。

```bash
# 社区用户
$ npx midway-version -u
# 内部用户
$ tnpx @ali/midway-version -u
```

如果项目为 pnpm 安装的依赖,请使用下面的命令。

```bash
# 社区用户
$ pnpx midway-version -u
# 内部用户
$ pnpx @ali/midway-version -u
```

如果你希望将更新写入到 `package.json` 中,请使用下面的命令。

```bash
# 社区用户
$ npx midway-version -u -w
# 内部用户
$ tnpx @ali/midway-version -u -w
```

如果项目为 pnpm 安装的依赖,请使用下面的命令。

```bash
# 社区用户
$ pnpx midway-version -u -w
# 内部用户
$ pnpx @ali/midway-version -u -w
```

:::tip

依赖更新写入 `package.json` 后,请重新安装依赖
更新的版本会写入 `package.json` `package-lock.json`,并需要重新安装依赖

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,19 @@ For example, when the following error occurs
You can use the following command to execute in the project root directory to check.

```bash
# Community user
$ npx midway-version
# Internal user
$ tnpx @ali/midway-version
```

If the project is a dependency of pnpm installation, please use the following command.

```bash
# Community user
$ pnpx midway-version
# Internal user
$ pnpx @ali/midway-version
```


Expand All @@ -60,30 +66,42 @@ $ pnpx midway-version
You can use the following command to execute the update prompt in the project root directory.

```bash
# Community user
$ npx midway-version -u
# Internal user
$ tnpx @ali/midway-version -u
```

If the project is a dependency of pnpm installation, please use the following command.

```bash
# Community user
$ pnpx midway-version -u
# Internal user
$ pnpx @ali/midway-version -u
```

If you want to write updates to `package.json`, please use the following command.

```bash
# Community user
$ npx midway-version -u -w
# Internal user
$ tnpx @ali/midway-version -u -w
```

If the project is a dependency of pnpm installation, please use the following command.

```bash
# Community user
$ pnpx midway-version -u -w
# Internal user
$ pnpx @ali/midway-version -u -w
```

:::tip

After dependency updates are written to `package.json`, please reinstall dependencies.
Newer versions will be written to `package.json` and `package-lock.json` and require reinstallation of dependencies.

:::

Expand Down

0 comments on commit 1fb98da

Please sign in to comment.