mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-15 01:57:28 +02:00
misc(v2): misc fixes
This commit is contained in:
parent
95b0cb942f
commit
d64581f2b4
9 changed files with 27 additions and 34 deletions
|
@ -49,8 +49,8 @@ module.exports = async function start(siteDir, cliOptions = {}) {
|
|||
const docsRelativeDir = props.siteConfig.customDocsPath;
|
||||
const fsWatcher = chokidar.watch(
|
||||
[
|
||||
// TODO: Watch plugin paths (e.g. blog)
|
||||
`../${docsRelativeDir}/**/*.md`,
|
||||
'blog/**/*.md',
|
||||
loadConfig.configFileName,
|
||||
'sidebars.json',
|
||||
],
|
||||
|
@ -59,11 +59,9 @@ module.exports = async function start(siteDir, cliOptions = {}) {
|
|||
ignoreInitial: true,
|
||||
},
|
||||
);
|
||||
fsWatcher.on('add', reload);
|
||||
fsWatcher.on('change', reload);
|
||||
fsWatcher.on('unlink', reload);
|
||||
fsWatcher.on('addDir', reload);
|
||||
fsWatcher.on('unlinkDir', reload);
|
||||
['add', 'change', 'unlink', 'addDir', 'unlinkDir'].forEach(event =>
|
||||
fsWatcher.on(event, reload),
|
||||
);
|
||||
}
|
||||
|
||||
const port = await getPort(cliOptions.port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue