Skip to content

Commit 3467de5

Browse files
committed
Revert glob support for internal use of chokidar (just watch a directory!) #119
1 parent b6a8b55 commit 3467de5

File tree

4 files changed

+6
-66
lines changed

4 files changed

+6
-66
lines changed

package-lock.json

Lines changed: 1 addition & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@
4646
"mime": "^4.0.7",
4747
"minimist": "^1.2.8",
4848
"morphdom": "^2.7.5",
49-
"picomatch": "^4.0.3",
5049
"please-upgrade-node": "^3.2.0",
5150
"send": "^1.2.0",
5251
"ssri": "^12.0.0",
53-
"tinyglobby": "^0.2.14",
5452
"urlpattern-polyfill": "^10.1.0",
5553
"ws": "^8.18.3"
5654
},

server.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import debugUtil from "debug";
1717

1818
import wrapResponse from "./server/wrapResponse.js";
1919
import ipAddress from "./server/ipAddress.js";
20-
import { findFiles } from "./server/globUtil.js";
2120

2221
const require = createRequire(import.meta.url);
2322
const pkg = require("./package.json");
@@ -175,10 +174,9 @@ export default class EleventyDevServer {
175174
return this.#watcher;
176175
}
177176

178-
let files = findFiles(this.options.watch);
179-
debug("Watching globs: %O, files: %O", this.options.watch, files);
177+
debug("Watching files: %O", this.options.watch);
180178
// TODO if using Eleventy and `watch` option includes output folder (_site) this will trigger two update events!
181-
this.#watcher = chokidar.watch(files, {
179+
this.#watcher = chokidar.watch(this.options.watch, {
182180
// TODO allow chokidar configuration extensions (or re-use the ones in Eleventy)
183181

184182
ignored: ["**/node_modules/**", ".git"],
@@ -212,10 +210,9 @@ export default class EleventyDevServer {
212210
}
213211
}
214212

215-
watchFiles(globs) {
216-
if(Array.isArray(globs) && globs.length > 0) {
217-
let files = findFiles(globs);
218-
debug("Also watching globs: %O files: %O", globs, files);
213+
watchFiles(files) {
214+
if(Array.isArray(files) && files.length > 0) {
215+
debug("Also watching: %O", files);
219216
this.watcher.add(files);
220217
}
221218
}

server/globUtil.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)