Skip to content

Commit

Permalink
Replace watch with chokidar
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Sep 21, 2022
1 parent 9d50a57 commit 1955127
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 36 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"aria-hidden": "^1.1.1",
"attr-accept": "^2.0.0",
"axe-core": "^4.3.5",
"chokidar": "^3.5.3",
"chromatic": "next",
"ci-info": "^3.3.1",
"classnames": "^2.2.6",
Expand Down Expand Up @@ -121,7 +122,6 @@
"vite-plugin-package-config": "^0.1.1",
"vite-tsconfig-paths": "^3.5.0",
"warning": "^4.0.3",
"watch": "^1.0.2",
"webpack": "5.73.0"
},
"resolutions": {
Expand Down
10 changes: 4 additions & 6 deletions packages/ag-grid-theme/scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const watch = require("watch");
const chokidar = require("chokidar");
const path = require("path");
const fs = require("fs");
const { pathToFileURL } = require("url");
Expand Down Expand Up @@ -73,10 +73,8 @@ process.argv.forEach((p) => {
});

if (isWatch) {
watch.createMonitor(path.resolve(__dirname, "../css/"), function (monitor) {
monitor.on("changed", function (f, curr, prev) {
console.log(`"${f}" changed. Rebuilding "${entry}"`);
tryBuildStyles();
});
chokidar.watch(path.resolve(__dirname, "../css/")).on("change", (path) => {
console.log(`"${path}" changed. Rebuilding "${entry}"`);
tryBuildStyles();
});
}
30 changes: 1 addition & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2986,6 +2986,7 @@ __metadata:
aria-hidden: ^1.1.1
attr-accept: ^2.0.0
axe-core: ^4.3.5
chokidar: ^3.5.3
chromatic: next
ci-info: ^3.3.1
classnames: ^2.2.6
Expand Down Expand Up @@ -3030,7 +3031,6 @@ __metadata:
vite-plugin-package-config: ^0.1.1
vite-tsconfig-paths: ^3.5.0
warning: ^4.0.3
watch: ^1.0.2
webpack: 5.73.0
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -12309,15 +12309,6 @@ __metadata:
languageName: node
linkType: hard

"exec-sh@npm:^0.2.0":
version: 0.2.2
resolution: "exec-sh@npm:0.2.2"
dependencies:
merge: ^1.2.0
checksum: 3ec5f99c8f7c4bebfeed1a797818f8754de00415d60a99f327e7f970834ca85252c449bf4b2efbff4c11e76eccc6b976a1956a5394a612d8e3d412185f59b0c0
languageName: node
linkType: hard

"exec-sh@npm:^0.3.2":
version: 0.3.6
resolution: "exec-sh@npm:0.3.6"
Expand Down Expand Up @@ -17585,13 +17576,6 @@ __metadata:
languageName: node
linkType: hard

"merge@npm:^1.2.0":
version: 1.2.1
resolution: "merge@npm:1.2.1"
checksum: 2298c4fdcf64561f320b92338681f7ffcafafb579a6e294066ae3e7bd10ae25df363903d2f028072733b9f79a1f75d2b999aef98ad5d73de13641da39cda0913
languageName: node
linkType: hard

"methods@npm:~1.1.2":
version: 1.1.2
resolution: "methods@npm:1.1.2"
Expand Down Expand Up @@ -25407,18 +25391,6 @@ __metadata:
languageName: node
linkType: hard

"watch@npm:^1.0.2":
version: 1.0.2
resolution: "watch@npm:1.0.2"
dependencies:
exec-sh: ^0.2.0
minimist: ^1.2.0
bin:
watch: ./cli.js
checksum: 7ffe99f8bdbd3311d84bdd80d90e74536da90d6b64b339a73dce57884c50527881b83e507e49ab85212682350791999c296fbf2a136b579530046fb97ffb9526
languageName: node
linkType: hard

"watchpack-chokidar2@npm:^2.0.1":
version: 2.0.1
resolution: "watchpack-chokidar2@npm:2.0.1"
Expand Down

0 comments on commit 1955127

Please sign in to comment.