Fix Netlify build by restoring dist build script and config

- Restore `scripts/build-dist.mjs` to clean `dist/`, build CSS, and copy assets.
- Update `package.json` to use the new build script and serve `dist`.
- Update `netlify.toml` to publish the `dist` directory.
- Update `dist/` artifacts to match current source.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-01 13:30:49 +00:00
1 parent a432d3d4c0
commit c862cbc358
72 files changed
+1555 -5883

No files matched your search

+4 -11
View File
@@ -4,8 +4,6 @@ import { COMMENT_EVENT_KIND } from "../nostr/commentEvents.js";
const DEFAULT_MAX_DISCUSSION_COUNT_VIDEOS = 24;
const COUNT_UNSUPPORTED_TITLE = "Relay does not support NIP-45 COUNT queries.";
const COUNT_PARTIAL_TITLE =
"Some relays timed out. Comment counts may be partial.";
function toPositiveInteger(value, fallback) {
const numeric = Number(value);
@@ -101,11 +99,10 @@ export default class DiscussionCountService {
}
const total = Number(result?.total);
const isPartial = Boolean(result?.partial);
const normalized =
Number.isFinite(total) && total >= 0 ? Math.floor(total) : 0;
this.videoDiscussionCountCache.set(video.id, normalized);
this.updateDiscussionCountElement(container, normalized, { partial: isPartial });
this.updateDiscussionCountElement(container, normalized);
return result;
})
.catch((error) => {
@@ -207,7 +204,7 @@ export default class DiscussionCountService {
element.removeAttribute("title");
}
updateDiscussionCountElement(element, count, { partial = false } = {}) {
updateDiscussionCountElement(element, count) {
if (!element) {
return;
}
@@ -220,13 +217,9 @@ export default class DiscussionCountService {
const numeric = Number(count);
const safeValue =
Number.isFinite(numeric) && numeric >= 0 ? Math.floor(numeric) : 0;
element.dataset.countState = partial ? "partial" : "ready";
element.dataset.countState = "ready";
valueEl.textContent = safeValue.toLocaleString();
if (partial) {
element.title = COUNT_PARTIAL_TITLE;
} else {
element.removeAttribute("title");
}
element.removeAttribute("title");
}
markDiscussionCountError(element, { unsupported = false } = {}) {