Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/verify-supabase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20' }
with: { node-version: '22' }
- run: node -v
- run: npm ci
- run: npm --prefix telcoinwiki-react ci
- run: npm run build
- run: npm run verify:supabase
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
publish = "."
command = "npm install --no-audit --no-fund --include=dev && export VITE_SUPABASE_URL=\"${VITE_SUPABASE_URL:-$NEXT_PUBLIC_SUPABASE_URL}\" && export VITE_SUPABASE_ANON_KEY=\"${VITE_SUPABASE_ANON_KEY:-$NEXT_PUBLIC_SUPABASE_ANON_KEY}\" && npm run build"
publish = "telcoinwiki-react/dist"
command = "npm ci --no-audit --no-fund && npm --prefix telcoinwiki-react ci --no-audit --no-fund && export VITE_SUPABASE_URL=\"${VITE_SUPABASE_URL:-$NEXT_PUBLIC_SUPABASE_URL}\" && export VITE_SUPABASE_ANON_KEY=\"${VITE_SUPABASE_ANON_KEY:-$NEXT_PUBLIC_SUPABASE_ANON_KEY}\" && npm run build"

[build.environment]
NODE_VERSION = "22.20.0"
Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
"node": ">=22 <23"
},
"scripts": {
"format": "prettier --write \"**/*.{html,css,js,json,md}\"",
"lint": "eslint \"**/*.js\" --max-warnings=0",
"dev": "npm --prefix telcoinwiki-react run dev",
"format": "npm --prefix telcoinwiki-react run format",
"lint": "npm --prefix telcoinwiki-react run lint",
"lint:ci": "npm --prefix telcoinwiki-react run lint:ci",
"test": "npm --prefix telcoinwiki-react run test",
"test:ci": "npm --prefix telcoinwiki-react run test:ci",
"check:html": "html-validate \"**/*.html\"",
"check:links": "linkinator . --recurse --silent --skip \"node_modules|dist\"",
"build:css": "csso styles/index.css --output dist/styles.css",
"build:js": "mkdir -p dist && node scripts/build-status-data.js && node node_modules/terser/bin/terser js/main.js -o dist/main.js --compress --mangle && node node_modules/terser/bin/terser js/faq.js -o dist/faq.js --compress --mangle && node node_modules/terser/bin/terser js/pools-data.js -o dist/pools.js --compress --mangle",
"build:img": "node scripts/optimize-images.js",
"prebuild": "node tools/make-supabase-test.mjs",
"build": "npm run build:css && npm run build:js && npm run build:img",
"prebuild": "node tools/make-supabase-test.mjs telcoinwiki-react/public/supabase-test",
"build": "npm --prefix telcoinwiki-react run build",
"preview": "npm --prefix telcoinwiki-react run preview",
"verify:supabase": "node tools/verify-supabase.mjs"
},
"type": "module",
Expand Down
1 change: 1 addition & 0 deletions telcoinwiki-react/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
dist
public/supabase-test
.DS_Store
.env
.env.*
Expand Down
8 changes: 5 additions & 3 deletions telcoinwiki-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"build": "vite build",
"preview": "vite preview",
"lint": "eslint .",
"lint:ci": "eslint . --max-warnings=0",
"format": "prettier --write .",
"test": "vitest"
"test": "vitest",
"test:ci": "vitest run"
},
"dependencies": {
"@supabase/supabase-js": "^2.58.0",
Expand Down
2 changes: 1 addition & 1 deletion tools/make-supabase-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { join } from "node:path";
const URL = process.env.NEXT_PUBLIC_SUPABASE_URL || process.env.VITE_SUPABASE_URL || "";
const KEY = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY || process.env.VITE_SUPABASE_ANON_KEY || "";

const outDir = "supabase-test";
const outDir = process.argv[2] || process.env.SUPABASE_TEST_OUT_DIR || "supabase-test";
const outFile = join(outDir, "index.html");
if (!existsSync(outDir)) mkdirSync(outDir, { recursive: true });

Expand Down