Rename
This commit is contained in:
parent
62795b55a0
commit
d65b7b6260
6 changed files with 7 additions and 7 deletions
|
|
@ -7,5 +7,5 @@ backend/package-lock.json
|
||||||
|
|
||||||
# Vendored / generated assets
|
# Vendored / generated assets
|
||||||
frontend/js/jquery.min.js
|
frontend/js/jquery.min.js
|
||||||
frontend/js/plausible.js
|
frontend/js/vendored.js
|
||||||
*.min.js
|
*.min.js
|
||||||
|
|
|
||||||
|
|
@ -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).
|
// 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({
|
init({
|
||||||
domain: "fizika.schmelczer.dev",
|
domain: "fizika.schmelczer.dev",
|
||||||
endpoint: "https://stats.schmelczer.dev/status",
|
endpoint: "https://stats.schmelczer.dev/status",
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,9 @@ app.use(express.static("public"));
|
||||||
|
|
||||||
// Serve the official Plausible tracker (npm: @plausible-analytics/tracker) from node_modules.
|
// Serve the official Plausible tracker (npm: @plausible-analytics/tracker) from node_modules.
|
||||||
const plausibleTrackerPath =
|
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);
|
res.sendFile(plausibleTrackerPath);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { init } from "./plausible.js";
|
import { init } from "./vendored.js";
|
||||||
|
|
||||||
init({
|
init({
|
||||||
domain: "fizika.schmelczer.dev",
|
domain: "fizika.schmelczer.dev",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"description": "Static frontend for the Fizika practice app",
|
"description": "Static frontend for the Fizika practice app",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"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"
|
"postinstall": "npm run vendor"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue