@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsnchn/buntastic",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "A simple static site generator built with Bun",
5
5
  "type": "module",
6
6
  "bin": {
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
  }