Skip to content

Commit

Permalink
docs($plugin): refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Dec 9, 2018
1 parent ecaa3a8 commit 71d9618
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
14 changes: 8 additions & 6 deletions packages/docs/docs/plugin/life-cycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ module.exports = {
}
```

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

- clientDynamicModules
- enhanceAppFiles
- [clientDynamicModules](./option-api.md#clientdynamicmodules)
- [enhanceAppFiles](./option-api.md#enhanceappfiles)

:::

Expand All @@ -34,14 +34,16 @@ module.exports = {
}
```

## generated
### generated

- Type: `AsyncFunction`
- Scope:`build`

```js
Called when a (production) build finishes, with an array of generated page HTML paths.

``` js
module.exports = {
async generated() {
async generated (pagePaths) {
// ...
}
}
Expand Down
12 changes: 7 additions & 5 deletions packages/docs/docs/zh/plugin/life-cycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ module.exports = {

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

- clientDynamicModules
- enhanceAppFiles
- [clientDynamicModules](./option-api.md#clientdynamicmodules)
- [enhanceAppFiles](./option-api.md#enhanceappfiles)

:::

Expand All @@ -35,14 +35,16 @@ module.exports = {
}
```

## generated
### generated

- 类型: `AsyncFunction`
- 作用域:`build`

```js
在生产环境的构建结束后被调用,生成的页面的路径数组将作为该函数的第一个参数。

``` js
module.exports = {
async generated() {
async generated (pagePaths) {
// ...
}
}
Expand Down

0 comments on commit 71d9618

Please sign in to comment.