diff --git a/core/docz-core/src/lib/DataServer.ts b/core/docz-core/src/lib/DataServer.ts index 7dbcf64e9..f4e47b42d 100644 --- a/core/docz-core/src/lib/DataServer.ts +++ b/core/docz-core/src/lib/DataServer.ts @@ -124,6 +124,6 @@ export class DataServer { } private async updateStateFile(): Promise { - await fs.outputJSON(paths.db, this.state) + await fs.outputJSON(paths.db, this.state, { spaces: 2 }) } } diff --git a/core/docz-core/src/states/entries.ts b/core/docz-core/src/states/entries.ts index b20826dad..47d5b658b 100644 --- a/core/docz-core/src/states/entries.ts +++ b/core/docz-core/src/states/entries.ts @@ -30,6 +30,7 @@ export const state = (entries: Entries, config: Config): State => { const files = Array.isArray(config.files) ? config.files.map(filePath => path.join(src, filePath)) : path.join(src, config.files) + const watcher = chokidar.watch(files, { cwd: paths.root, ignored: /(((^|[\/\\])\..+)|(node_modules))/,