提交 ddeed7e2 编写于 作者: U ULIVZ

docs: wip commit

上级 e659a869
......@@ -62,7 +62,7 @@ module.exports = {
### Use plugins from npm
A plugin can be published on npm in `CommonJS` format as `vuepress-plugin-xxx` <Badge type='tip' text='R'/>. Then you can use it like this:
A plugin can be published on npm in `CommonJS` format as `vuepress-plugin-xxx`. Then you can use it like this:
``` js
module.exports = {
......@@ -271,12 +271,49 @@ module.exports = {
```
module.exports = (options, context) => {
return {
enable: !context.isProd
}
// ...
}
```
### context.isProd
- Type: `boolean`
Whether vuepress run in production environment mode.
### context.sourceDir
- Type: `string`
Root path of the docs.
### context.outDir
- Type: `string`
Output path.
### context.themePath
- Type: `string`
The path of the currently active theme.
### context.publicPath
- Type: `string`
See: [base](../config/README.md#base).
### context.resolve
- Type: `Function`
### context.writeTemp
- Type: `Function`
## Lifecycle
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册