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