[Tiny PR, 8 loc diff] Reduce build process noise (#766)

* Reduce build process noise

- Only run 11ty when something has changed within `docs/`
- Only run esbuild if a JS file has changed within

* Update scripts/build.js

Co-authored-by: Konnor Rogers <konnor5456@gmail.com>

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
This commit is contained in:
Lea Verou
2025-05-08 16:05:52 -04:00
committed by GitHub
parent 00a3b1aa8d
commit 38c13640fc

View File

@@ -353,7 +353,9 @@ if (isDeveloping) {
return;
}
await regenerateBundle();
if (filename.includes('src/') && /\.(js|ts|css)$/.test(filename)) {
await regenerateBundle();
}
// Copy stylesheets when CSS files change
if (isCssStylesheet) {
@@ -366,7 +368,9 @@ if (isDeveloping) {
}
// This needs to be outside of "isComponent" check because SSR needs to run on CSS files too.
await generateDocs();
if (filename.includes('/docs/')) {
await generateDocs();
}
reload();
} catch (err) {