Skip to content

Commit 71d9618

Browse files
committed
docs($plugin): refactor
1 parent ecaa3a8 commit 71d9618

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

Diff for: packages/docs/docs/plugin/life-cycle.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ module.exports = {
1313
}
1414
```
1515

16-
::: tip 提示
16+
::: tip
1717
The `ready` hook is executed after the application is initialized and before some specific functional APIs are executed. These functional APIs include:
1818

19-
- clientDynamicModules
20-
- enhanceAppFiles
19+
- [clientDynamicModules](./option-api.md#clientdynamicmodules)
20+
- [enhanceAppFiles](./option-api.md#enhanceappfiles)
2121

2222
:::
2323

@@ -34,14 +34,16 @@ module.exports = {
3434
}
3535
```
3636

37-
## generated
37+
### generated
3838

3939
- Type: `AsyncFunction`
4040
- Scope:`build`
4141

42-
```js
42+
Called when a (production) build finishes, with an array of generated page HTML paths.
43+
44+
``` js
4345
module.exports = {
44-
async generated() {
46+
async generated (pagePaths) {
4547
// ...
4648
}
4749
}

Diff for: packages/docs/docs/zh/plugin/life-cycle.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ module.exports = {
1717

1818
`ready` 钩子在应用初始化之后,并在某些特定的函数式 API 执行之前执行。这些函数式 API 包括:
1919

20-
- clientDynamicModules
21-
- enhanceAppFiles
20+
- [clientDynamicModules](./option-api.md#clientdynamicmodules)
21+
- [enhanceAppFiles](./option-api.md#enhanceappfiles)
2222

2323
:::
2424

@@ -35,14 +35,16 @@ module.exports = {
3535
}
3636
```
3737

38-
## generated
38+
### generated
3939

4040
- 类型: `AsyncFunction`
4141
- 作用域:`build`
4242

43-
```js
43+
在生产环境的构建结束后被调用,生成的页面的路径数组将作为该函数的第一个参数。
44+
45+
``` js
4446
module.exports = {
45-
async generated() {
47+
async generated (pagePaths) {
4648
// ...
4749
}
4850
}

0 commit comments

Comments
 (0)