Skip to content

Commit 90c1d55

Browse files
committed
🤖 refactor: move geist to devDependencies and automate font copying
- Move geist package to devDependencies (only used at build time) - Add scripts/copy-fonts.sh to copy fonts from node_modules to public/ - Integrate font copying into Makefile build-static target - Font files are now copied during build, not checked into git This keeps the geist package as the source of truth for font files while avoiding duplication in the repository.
1 parent 1c6cb44 commit 90c1d55

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ build-renderer: node_modules/.installed src/version.ts ## Build renderer process
145145
build-static: ## Copy static assets to dist
146146
@echo "Copying static assets..."
147147
@mkdir -p dist
148+
@./scripts/copy-fonts.sh
148149
@cp static/splash.html dist/splash.html
149150
@cp -r public/* dist/
150151

bun.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"disposablestack": "^1.1.7",
2727
"electron-updater": "^6.6.2",
2828
"express": "^5.1.0",
29-
"geist": "^1.5.1",
3029
"jsonc-parser": "^3.3.1",
3130
"lru-cache": "^11.2.2",
3231
"markdown-it": "^14.1.0",
@@ -88,6 +87,7 @@
8887
"eslint-plugin-react-hooks": "^5.2.0",
8988
"eslint-plugin-storybook": "10.0.0",
9089
"eslint-plugin-tailwindcss": "4.0.0-beta.0",
90+
"geist": "^1.5.1",
9191
"jest": "^30.1.3",
9292
"mermaid": "^11.12.0",
9393
"nodemon": "^3.1.10",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"disposablestack": "^1.1.7",
6666
"electron-updater": "^6.6.2",
6767
"express": "^5.1.0",
68-
"geist": "^1.5.1",
6968
"jsonc-parser": "^3.3.1",
7069
"lru-cache": "^11.2.2",
7170
"markdown-it": "^14.1.0",
@@ -127,6 +126,7 @@
127126
"eslint-plugin-react-hooks": "^5.2.0",
128127
"eslint-plugin-storybook": "10.0.0",
129128
"eslint-plugin-tailwindcss": "4.0.0-beta.0",
129+
"geist": "^1.5.1",
130130
"jest": "^30.1.3",
131131
"mermaid": "^11.12.0",
132132
"nodemon": "^3.1.10",

scripts/copy-fonts.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
# Copy Geist fonts from node_modules to public/fonts
3+
set -euo pipefail
4+
5+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
7+
8+
mkdir -p "${PROJECT_ROOT}/public/fonts/geist-sans"
9+
mkdir -p "${PROJECT_ROOT}/public/fonts/geist-mono"
10+
11+
cp "${PROJECT_ROOT}/node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2" \
12+
"${PROJECT_ROOT}/public/fonts/geist-sans/"
13+
14+
cp "${PROJECT_ROOT}/node_modules/geist/dist/fonts/geist-mono/GeistMono-Variable.woff2" \
15+
"${PROJECT_ROOT}/public/fonts/geist-mono/"
16+
17+
echo "✓ Copied Geist fonts to public/fonts/"

0 commit comments

Comments
 (0)