docs: move build instructions from README to BUILDING.md

- Move detailed setup and build instructions from README.md to BUILDING.md
- Add concise reference to BUILDING.md in README.md
- Keep testing and other documentation in README.md
- Improve organization of documentation by separating build-specific content
This commit is contained in:
Matthew Raymer
2025-02-13 04:48:18 +00:00
parent d8c1a84cfe
commit ec1f50af69
6 changed files with 82 additions and 135 deletions

View File

@@ -3,7 +3,10 @@
import { register } from "register-service-worker";
// Only register service worker if explicitly enabled and in production
if (process.env.VITE_PWA_ENABLED === 'true' && process.env.NODE_ENV === "production") {
if (
process.env.VITE_PWA_ENABLED === "true" &&
process.env.NODE_ENV === "production"
) {
register(`${process.env.BASE_URL}sw.js`, {
ready() {
console.log("Service worker is active.");
@@ -21,12 +24,16 @@ if (process.env.VITE_PWA_ENABLED === 'true' && process.env.NODE_ENV === "product
console.log("New content is available; please refresh.");
},
offline() {
console.log("No internet connection found. App is running in offline mode.");
console.log(
"No internet connection found. App is running in offline mode.",
);
},
error(error) {
console.error("Error during service worker registration:", error);
}
},
});
} else {
console.log("Service worker registration skipped - not enabled or not in production");
console.log(
"Service worker registration skipped - not enabled or not in production",
);
}