t0n 0.20260703.0 → 0.20260706.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli.ts +4 -3
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -34,11 +34,12 @@ export function shutdown(cb: (signal: string, e: unknown) => void | Promise<void
|
|
|
34
34
|
|
|
35
35
|
export async function watch(
|
|
36
36
|
cb: (e: ChokidarEventName | string, file: string) => Promise<void>,
|
|
37
|
-
paths: string[],
|
|
38
|
-
root?: string
|
|
37
|
+
paths: string | string[],
|
|
38
|
+
root?: string,
|
|
39
|
+
ignore?: string | RegExp | ((testString: string) => boolean)
|
|
39
40
|
) {
|
|
40
41
|
const codeWatcher = chokidar.watch(paths, {
|
|
41
|
-
ignored: /(^|[/\\])\../, // ignore hidden files
|
|
42
|
+
ignored: ignore ? ignore : /(^|[/\\])\../, // ignore hidden files
|
|
42
43
|
persistent: true,
|
|
43
44
|
ignoreInitial: true,
|
|
44
45
|
awaitWriteFinish: {
|