Skip to content

Commit 5f0b221

Browse files
YuYang019ulivz
authored andcommitted
docs: add 'extraWatchFiles' option to the documentation (#1593)
1 parent 0623098 commit 5f0b221

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

Diff for: packages/docs/docs/config/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,23 @@ vuepress dev docs --no-cache # remove cache before each build.
113113
```
114114
:::
115115

116+
### extraWatchFiles
117+
118+
- Type: `Array`
119+
- Default: `[]`
120+
121+
Specify extra files to be watched.
122+
123+
You can watch any file if you want. File changes will trigger `vuepress` rebuilding and real-time updates.
124+
125+
``` js
126+
module.exports = {
127+
extraWatchFiles: [
128+
'.vuepress/foo.js', // Relative path usage
129+
'/path/to/bar.js' // Absolute path usage
130+
]
131+
}
132+
```
116133

117134
## Styling
118135

Diff for: packages/docs/docs/zh/config/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,24 @@ vuepress dev docs --no-cache # 在每次构建前删除 cache
109109
```
110110
:::
111111

112+
### extraWatchFiles
113+
114+
- 类型: `Array`
115+
- 默认值: `[]`
116+
117+
指定额外的需要被监听的文件。
118+
119+
你可以监听任何想监听的文件,文件变动将会触发 `vuepress` 重新构建,并实时更新。
120+
121+
``` js
122+
module.exports = {
123+
extraWatchFiles: [
124+
'.vuepress/foo.js', // 使用相对路径
125+
'/path/to/bar.js' // 使用绝对路径
126+
]
127+
}
128+
```
129+
112130
## Styling
113131

114132
### palette.styl

0 commit comments

Comments
 (0)