Mirrors the GitLab pipeline — typecheck, tests, feed sanity — and adds a Pages deploy. Pages serves from /<repo>/, and the app used absolute asset paths, so that job would have shipped a site that 404s on everything. Assets now resolve against a <base href> the build substitutes, the feed URL resolves against document.baseURI so deep links work too, and the service worker derives its paths from its own registration scope. Root-hosted builds are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
31 lines
1.2 KiB
JSON
31 lines
1.2 KiB
JSON
{
|
|
"name": "gacha-event-tracker",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"test": "bun test",
|
|
"typecheck": "tsc --noEmit",
|
|
"parse": "bun run scripts/parse-fixture.ts",
|
|
"build:feed": "bun run scripts/build-feed.ts",
|
|
"build:css": "bunx @tailwindcss/cli -i src/client/styles.css -o public/styles.css --minify",
|
|
"build:js": "bun build src/client/main.tsx --outfile public/main.js --minify",
|
|
"build": "bun run build:feed && bun run build:css && bun run build:js && bun run build:static",
|
|
"dev": "bun run build && bun run serve.ts",
|
|
"build:static": "mkdir -p public && sed \"s|__BASE__|${BASE_PATH:-/}|g\" index.html > public/index.html && cp src/client/sw.js public/sw.js && cp src/client/manifest.webmanifest public/manifest.webmanifest && cp src/client/icon.svg public/icon.svg",
|
|
"serve": "bun run serve.ts"
|
|
},
|
|
"dependencies": {
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"zod": "^3.23.8"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/cli": "^4.3.3",
|
|
"@types/bun": "^1.1.10",
|
|
"@types/react": "^19.2.18",
|
|
"@types/react-dom": "^19.2.4",
|
|
"tailwindcss": "^4.3.3",
|
|
"typescript": "^5.6.3"
|
|
}
|
|
}
|