Skip to content

Commit 8e01100

Browse files
committed
chore: simplify config and makefile for local build/run workflow
1 parent c9ec95f commit 8e01100

17 files changed

Lines changed: 207 additions & 102 deletions

.prettierrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
2-
"plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-organize-imports"],
2+
"plugins": [
3+
"prettier-plugin-tailwindcss",
4+
"prettier-plugin-organize-imports"
5+
],
36
"semi": true,
47
"singleQuote": true,
58
"trailingComma": "all",

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<!-- BEGIN:nextjs-agent-rules -->
2+
23
# This is NOT the Next.js you know
34

45
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.

Makefile

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,42 @@
1-
.PHONY: help install ci lint build check docker-ci
1+
.PHONY: help ci build check run check-logs clean rebuild all
22

33
NPM10 := npx -y npm@10.8.2
4-
DOCKER_IMAGE := devfest2026-ci
4+
LOG_DIR := logs
5+
OUT_DIR := out
6+
PORT ?= 8080
57

68
help:
7-
@echo "Targets:"
8-
@echo " make install - Install deps with npm 10 (CI parity)"
9-
@echo " make ci - Run npm 10 clean install"
10-
@echo " make lint - Run ESLint"
11-
@echo " make build - Build Next.js app"
12-
@echo " make check - Run ci + lint + build"
13-
@echo " make docker-ci - Build CI parity Docker image"
14-
15-
install: ci
9+
@echo Targets:
10+
@echo make ci - Install dependencies with npm@10 (CI parity)
11+
@echo make build - Build Next.js app (static export to ./out)
12+
@echo make check - Run ci + build
13+
@echo make clean - Remove ./out and ./logs (use DEEP=1 to also remove node_modules)
14+
@echo make rebuild - clean + ci + build
15+
@echo make run - Serve ./out at http://localhost:$(PORT) (Docker required)
16+
@echo make all - rebuild + run (example: make all PORT=3001)
17+
@echo make check-logs - Run ci+build and save full log to ./logs
1618

1719
ci:
18-
$(NPM10) ci
19-
20-
lint:
21-
npm run lint
20+
@echo Using node:
21+
@node -v
22+
@echo Using npm (npx wrapper):
23+
@$(NPM10) --version
24+
$(NPM10) ci --loglevel info
2225

2326
build:
24-
npm run build
27+
@powershell -NoProfile -Command "$$ts = Get-Date -Format yyyyMMddHHmmss; New-Item -ItemType Directory -Force -Path '$(LOG_DIR)' | Out-Null; npm run build 2>&1 | Tee-Object -FilePath ('$(LOG_DIR)/build-' + $$ts + '.log')"
28+
29+
check: ci build
30+
31+
clean:
32+
@powershell -NoProfile -Command "Write-Host 'Cleaning $(OUT_DIR) and $(LOG_DIR)'; Remove-Item -Recurse -Force '$(OUT_DIR)','$(LOG_DIR)' -ErrorAction SilentlyContinue; if ('$(DEEP)' -eq '1') { Write-Host 'Deep clean: removing node_modules'; Remove-Item -Recurse -Force 'node_modules' -ErrorAction SilentlyContinue }"
33+
34+
rebuild: clean ci build
35+
36+
check-logs:
37+
@powershell -NoProfile -Command "$$ts = Get-Date -Format yyyyMMddHHmmss; New-Item -ItemType Directory -Force -Path '$(LOG_DIR)' | Out-Null; $$log = '$(LOG_DIR)/ci-' + $$ts + '.log'; Start-Transcript -Path $$log -Force | Out-Null; Write-Host ('Node: ' + (node -v)); & npx -y npm@10.8.2 ci --loglevel info; npm run build; Stop-Transcript | Out-Null; Write-Host ('Logs saved -> ' + $$log)"
2538

26-
check: ci lint build
39+
run:
40+
@powershell -NoProfile -Command "if (-not (Test-Path '$(OUT_DIR)')) { Write-Error 'Error: $(OUT_DIR) not found. Run make build first.'; exit 1 }; $$hostPath = (Resolve-Path '$(OUT_DIR)').Path; Write-Host ('Serving $(OUT_DIR) on http://localhost:$(PORT)'); docker run --rm -p $(PORT):80 -v ('{0}:/usr/share/nginx/html:ro' -f $$hostPath) nginx:alpine"
2741

28-
docker-ci:
29-
docker build -f Dockerfile.ci -t $(DOCKER_IMAGE) .
42+
all: rebuild run

eslint.config.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import { defineConfig, globalIgnores } from "eslint/config";
2-
import nextVitals from "eslint-config-next/core-web-vitals";
3-
import nextTs from "eslint-config-next/typescript";
1+
import nextVitals from 'eslint-config-next/core-web-vitals';
2+
import nextTs from 'eslint-config-next/typescript';
3+
import { defineConfig, globalIgnores } from 'eslint/config';
44

55
const eslintConfig = defineConfig([
66
...nextVitals,
77
...nextTs,
88
// Override default ignores of eslint-config-next.
99
globalIgnores([
1010
// Default ignores of eslint-config-next:
11-
".next/**",
12-
"out/**",
13-
"build/**",
14-
"next-env.d.ts",
11+
'.next/**',
12+
'out/**',
13+
'build/**',
14+
'next-env.d.ts',
1515
]),
1616
]);
1717

logs/build-20260709143731.log

1.57 KB
Binary file not shown.

next.config.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,9 @@ import createNextIntlPlugin from 'next-intl/plugin';
33

44
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts');
55

6-
const isGithubActions = process.env.GITHUB_ACTIONS === 'true';
7-
const repositoryName = process.env.GITHUB_REPOSITORY?.split('/')[1] ?? '';
8-
const githubPagesBasePath = isGithubActions && repositoryName ? `/${repositoryName}` : '';
9-
106
const nextConfig: NextConfig = {
117
output: 'export',
128
trailingSlash: true,
13-
basePath: githubPagesBasePath,
14-
assetPrefix: githubPagesBasePath || undefined,
159
images: {
1610
unoptimized: true,
1711
},

postcss.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const config = {
22
plugins: {
3-
"@tailwindcss/postcss": {},
4-
"autoprefixer": {},
3+
'@tailwindcss/postcss': {},
4+
autoprefixer: {},
55
},
66
};
77

src/app/[locale]/layout.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
import { NextIntlClientProvider } from 'next-intl';
2-
import { getMessages, getTranslations, setRequestLocale } from 'next-intl/server';
1+
import { routing } from '@/i18n/routing';
32
import type { Metadata } from 'next';
4-
import { notFound } from 'next/navigation';
3+
import { NextIntlClientProvider } from 'next-intl';
4+
import {
5+
getMessages,
6+
getTranslations,
7+
setRequestLocale,
8+
} from 'next-intl/server';
59
import { Inter, JetBrains_Mono, Space_Grotesk } from 'next/font/google';
6-
import { routing } from '@/i18n/routing';
10+
import { notFound } from 'next/navigation';
711
import '../globals.css';
812

913
const inter = Inter({
@@ -60,8 +64,12 @@ export default async function LocaleLayout({
6064

6165
return (
6266
<html lang={locale}>
63-
<body className={`${inter.variable} ${jetBrainsMono.variable} ${spaceGrotesk.variable}`}>
64-
<NextIntlClientProvider messages={messages}>{children}</NextIntlClientProvider>
67+
<body
68+
className={`${inter.variable} ${jetBrainsMono.variable} ${spaceGrotesk.variable}`}
69+
>
70+
<NextIntlClientProvider messages={messages}>
71+
{children}
72+
</NextIntlClientProvider>
6573
</body>
6674
</html>
6775
);

src/app/[locale]/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import {
2+
HomeLanding,
3+
type HomeLandingCopy,
4+
} from '@/components/home/home-landing';
15
import { getTranslations, setRequestLocale } from 'next-intl/server';
2-
import { HomeLanding, type HomeLandingCopy } from '@/components/home/home-landing';
36

47
export default async function Home({
58
params,

src/app/globals.css

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@
2020
body {
2121
background-color: var(--color-background);
2222
color: var(--color-foreground);
23-
font-family: var(--font-inter), ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
23+
font-family:
24+
var(--font-inter),
25+
ui-sans-serif,
26+
system-ui,
27+
-apple-system,
28+
Segoe UI,
29+
Roboto,
30+
Helvetica,
31+
Arial,
2432
sans-serif;
2533
}
2634
}
@@ -30,26 +38,40 @@
3038
}
3139

3240
@utility font-mono-tech {
33-
font-family: var(--font-jetbrains-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
41+
font-family:
42+
var(--font-jetbrains-mono), ui-monospace, SFMono-Regular, Menlo, Monaco,
43+
Consolas, monospace;
3444
}
3545

3646
@layer components {
3747
.retro-hero {
3848
position: relative;
3949
overflow: hidden;
40-
background: radial-gradient(circle at 20% 20%, rgba(30, 30, 30, 0.2), transparent 40%),
41-
radial-gradient(circle at 80% 70%, rgba(30, 30, 30, 0.15), transparent 45%), var(--color-background);
50+
background:
51+
radial-gradient(
52+
circle at 20% 20%,
53+
rgba(30, 30, 30, 0.2),
54+
transparent 40%
55+
),
56+
radial-gradient(
57+
circle at 80% 70%,
58+
rgba(30, 30, 30, 0.15),
59+
transparent 45%
60+
),
61+
var(--color-background);
4262
}
4363

4464
.blueprint-grid {
45-
background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
65+
background-image:
66+
linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
4667
linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
4768
background-size: 72px 72px;
4869
opacity: 0.32;
4970
}
5071

5172
.blueprint-subgrid {
52-
background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
73+
background-image:
74+
linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
5375
linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
5476
background-size: 24px 24px;
5577
opacity: 0.2;
@@ -59,7 +81,12 @@
5981
position: absolute;
6082
inset-inline: 0;
6183
height: 2px;
62-
background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
84+
background: linear-gradient(
85+
to right,
86+
transparent,
87+
rgba(255, 255, 255, 0.3),
88+
transparent
89+
);
6390
animation: scan 8s linear infinite;
6491
}
6592

0 commit comments

Comments
 (0)