mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-27 17:00:54 +01:00
Fixed file watching for Chokidar 4
This commit is contained in:
parent
2014b634e8
commit
a9be02645b
@ -26,6 +26,7 @@ import {
|
|||||||
EMPTY,
|
EMPTY,
|
||||||
concat,
|
concat,
|
||||||
defer,
|
defer,
|
||||||
|
from,
|
||||||
map,
|
map,
|
||||||
merge,
|
merge,
|
||||||
mergeMap,
|
mergeMap,
|
||||||
@ -47,6 +48,7 @@ import {
|
|||||||
transformScript,
|
transformScript,
|
||||||
transformStyle
|
transformStyle
|
||||||
} from "./transform"
|
} from "./transform"
|
||||||
|
import glob from "tiny-glob"
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------------
|
/* ----------------------------------------------------------------------------
|
||||||
* Helper types
|
* Helper types
|
||||||
@ -213,7 +215,9 @@ const manifest$ = merge(
|
|||||||
})
|
})
|
||||||
.map(([pattern, observable$]) => (
|
.map(([pattern, observable$]) => (
|
||||||
defer(() => process.argv.includes("--watch")
|
defer(() => process.argv.includes("--watch")
|
||||||
? watch(pattern, { cwd: "src" })
|
? from(glob(pattern, { cwd: "src" })).pipe(
|
||||||
|
switchMap(files => watch(files, { cwd: "src" }))
|
||||||
|
)
|
||||||
: EMPTY
|
: EMPTY
|
||||||
)
|
)
|
||||||
.pipe(
|
.pipe(
|
||||||
|
Loading…
Reference in New Issue
Block a user