Skip to content

Commit 4e6d369

Browse files
committed
replace gaze with chokidar
(more modern, better maintained, does not have outdated dependencies, etc.)
1 parent 8a5395e commit 4e6d369

3 files changed

Lines changed: 39 additions & 75 deletions

File tree

package-lock.json

Lines changed: 31 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
"browserslist": "^4.27.0",
109109
"browserslist-to-esbuild": "^2.1.1",
110110
"chai": "^6.2.0",
111+
"chokidar": "^5.0.0",
111112
"cldr-core": "^48.0.0",
112113
"cldr-localenames-full": "^48.0.0",
113114
"concat-files": "^0.1.1",
@@ -119,7 +120,6 @@
119120
"eslint": "^10.0.0",
120121
"fake-indexeddb": "^6.2.5",
121122
"fetch-mock": "^11.1.1",
122-
"gaze": "^1.1.3",
123123
"globals": "^17.3.0",
124124
"happen": "^0.3.2",
125125
"js-yaml": "^4.1.1",

scripts/server.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import http from 'node:http';
2+
import { glob } from 'node:fs/promises';
23
import { styleText } from 'node:util';
3-
import gaze from 'gaze';
4+
import { watch } from 'chokidar';
45
import serve from 'serve-handler';
56
import { buildCSS } from './build_css.js';
67

78
const port = 8080;
89

9-
gaze(['css/**/*.css'], (err, watcher) => {
10-
watcher.on('all', () => buildCSS());
10+
watch(
11+
await Array.fromAsync(glob('css/**/*.css')), {
12+
ignoreInitial: false
13+
}).on('all', () => {
14+
buildCSS();
1115
});
1216

1317
const server = http.createServer((request, response) => {

0 commit comments

Comments
 (0)