Skip to content

Commit

Permalink
docs: cache option
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Nov 13, 2018
1 parent 3871f4a commit 810acda
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/docs/docs/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,25 @@ A function to control what files should have `<link rel="preload">` resource hin

Whether to enable placeholder loading for asynchronous loading content. if it's a stirng, it should be the name of your custom loading component.

### cache

- Type: `boolean|string`
- Default: `true`

VuePress uses [cache-loader](https://github.com/webpack-contrib/cache-loader) by default to greatly speed up the compilation of webpack.

This option can be used to specify the path to the cache, and can also remove the cache before each build by setting it to `false`.

::: tip
This option can also be used through the CLI:

```bash
vuepress dev docs --cache .cache # set cache path
vuepress dev docs --no-cache # remove cache before each build.
```
:::


## Styling

### palette.styl
Expand Down
17 changes: 17 additions & 0 deletions packages/docs/docs/zh/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,23 @@ module.exports = {

是否对异步加载页面的内容开启占位符加载。如果它是一个字符串,那么它应该是自定义加载组件的名称。

### cache

- Type: `boolean|string`
- Default: `true`

VuePress 默认使用了 [cache-loader](https://github.com/webpack-contrib/cache-loader) 来大大地加快 webpack 的编译速度。

此选项可以用于指定 cache 的路径,同时也可以通过设置为 `false` 来在每次构建之前删除 cache。

::: tip
这个选项也可以通过命令行来使用:
```bash
vuepress dev docs --cache .cache # 设置 cache 路径
vuepress dev docs --no-cache # 在每次构建前删除 cache
```
:::

## Styling

> To be translated.
Expand Down

0 comments on commit 810acda

Please sign in to comment.