Rename
Some checks failed
Test / test (push) Failing after 7s
Deploy to Pages / deploy (push) Successful in 8s
Build and Publish Docker Image / build-and-push (push) Successful in 15s

This commit is contained in:
Andras Schmelczer 2026-06-06 21:12:20 +01:00
parent 62795b55a0
commit d65b7b6260
6 changed files with 7 additions and 7 deletions

View file

@ -7,5 +7,5 @@ backend/package-lock.json
# Vendored / generated assets
frontend/js/jquery.min.js
frontend/js/plausible.js
frontend/js/vendored.js
*.min.js

View file

@ -1,7 +1,7 @@
import { init } from "/vendor/plausible.js";
import { init } from "/vendor/vendored.js";
// Plausible analytics via the official npm tracker (@plausible-analytics/tracker).
// server.js serves /vendor/plausible.js straight from node_modules.
// server.js serves /vendor/vendored.js straight from node_modules.
init({
domain: "fizika.schmelczer.dev",
endpoint: "https://stats.schmelczer.dev/status",

View file

@ -39,9 +39,9 @@ app.use(express.static("public"));
// Serve the official Plausible tracker (npm: @plausible-analytics/tracker) from node_modules.
const plausibleTrackerPath =
require.resolve("@plausible-analytics/tracker/plausible.js");
require.resolve("@plausible-analytics/tracker/vendored.js");
app.get("/vendor/plausible.js", (req, res) => {
app.get("/vendor/vendored.js", (req, res) => {
res.sendFile(plausibleTrackerPath);
});

View file

@ -1,4 +1,4 @@
import { init } from "./plausible.js";
import { init } from "./vendored.js";
init({
domain: "fizika.schmelczer.dev",

View file

@ -4,7 +4,7 @@
"description": "Static frontend for the Fizika practice app",
"private": true,
"scripts": {
"vendor": "cp node_modules/@plausible-analytics/tracker/plausible.js js/plausible.js",
"vendor": "cp node_modules/@plausible-analytics/tracker/vendored.js js/vendored.js",
"postinstall": "npm run vendor"
},
"dependencies": {