@jsnchn/buntastic 0.0.11 → 0.0.12

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 +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsnchn/buntastic",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "A simple static site generator built with Bun",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -356,6 +356,14 @@ async function dev(): Promise<void> {
356
356
  fsWatch(dir, { recursive: true }, (eventType, filename) => {
357
357
  if (!filename) return;
358
358
  if (filename.endsWith("~") || filename.startsWith(".")) return;
359
+
360
+ if (dir === PUBLIC_DIR) {
361
+ const ext = filename.split(".").pop()?.toLowerCase();
362
+ if (ext && !["css", "js", "ts", "mjs"].includes(ext)) {
363
+ return;
364
+ }
365
+ }
366
+
359
367
  console.log(`[${eventType}] ${filename} - rebuilding...`);
360
368
  scheduleBuild();
361
369
  });