-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(create-dumi): add preview scripts * docs: add commands doc * Update docs/config/commands.md Co-authored-by: Peach <[email protected]> * chore: update * chore: update category --------- Co-authored-by: Peach <[email protected]>
- Loading branch information
1 parent
59c0f02
commit 6072519
Showing
7 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
toc: content | ||
group: 其他 | ||
order: 1 | ||
--- | ||
|
||
# 命令行 | ||
|
||
## `dumi dev` | ||
|
||
启动本地开发服务器,进行项目的开发与调试。 | ||
|
||
## `dumi build` | ||
|
||
构建 dumi 文档产物,适用于生产环境的部署。 | ||
|
||
## `dumi preview` | ||
|
||
在本地启动一个静态 Web 服务器,将 docs-dist 文件夹运行在 http://127.0.0.1:4172, 用于预览构建后产物。 | ||
|
||
你可以通过 `--port` 参数来配置服务的运行端口。 | ||
|
||
```bash | ||
dumi preview --port 9527 | ||
``` | ||
|
||
现在 `preview` 命令会将服务器运行在 http://127.0.0.1:9527 | ||
|
||
## `dumi setup` | ||
|
||
初始化项目,会做临时文件的生成等操作。通常在 package.json 的 `scripts.prepare` 里设置。 | ||
|
||
```json | ||
{ | ||
"scripts": { | ||
"prepare": "dumi setup" | ||
} | ||
} | ||
``` | ||
|
||
## `dumi version` | ||
|
||
查看 dumi 版本,等同于 `dumi -v`。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
group: 其他 | ||
order: 2 | ||
order: 3 | ||
--- | ||
|
||
# 常见问题 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
group: | ||
title: 其他 | ||
order: 3 | ||
order: 2 | ||
--- | ||
|
||
# 从 dumi 1.x 升级 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters