| 62 | } |
| 63 | log.info("watcher backend", { platform: process.platform, backend }) |
| 64 | const subscribe: ParcelWatcher.SubscribeCallback = (err, evts) => { |
| 65 | if (err) return |
| 66 | for (const evt of evts) { |
| 67 | if (evt.type === "create") Bus.publish(Event.Updated, { file: evt.path, event: "add" }) |
| 68 | if (evt.type === "update") Bus.publish(Event.Updated, { file: evt.path, event: "change" }) |
| 69 | if (evt.type === "delete") Bus.publish(Event.Updated, { file: evt.path, event: "unlink" }) |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | const subs = [] |
| 74 | const cfgIgnores = cfg.watcher?.ignore ?? [] |