@jsnchn/buntastic 0.0.7 → 0.0.8
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/index.ts +10 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -320,6 +320,16 @@ async function dev(): Promise<void> {
|
|
|
320
320
|
for (const watcher of watchers) {
|
|
321
321
|
(async () => {
|
|
322
322
|
for await (const event of watcher) {
|
|
323
|
+
const filename = event.filename || "";
|
|
324
|
+
const isPublicFile = filename.includes("public");
|
|
325
|
+
|
|
326
|
+
if (isPublicFile) {
|
|
327
|
+
const ext = filename.split(".").pop()?.toLowerCase();
|
|
328
|
+
if (ext !== "css" && ext !== "js" && ext !== "ts") {
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
323
333
|
console.log(`[${event.eventType}] ${event.filename} - rebuilding...`);
|
|
324
334
|
rebuild();
|
|
325
335
|
}
|