Skip to content

Commit

Permalink
Add: Fonts build process
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianKoerner committed Jun 20, 2024
1 parent df95f2a commit cb09aca
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 152 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,7 @@ dist
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
.pnp.*

# font build
fonts
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ FROM node:20-slim AS prod
EXPOSE 3000
WORKDIR /app
COPY --from=build /app/dist /app/dist
COPY fonts /app/fonts
COPY versions /app/versions
COPY package.json /app/package.json
COPY package-lock.json /app/package-lock.json
RUN npm ci --production

CMD ["npm", "start"]
CMD ["npm", "start"]
70 changes: 44 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"author": "Florian Körner <[email protected]>",
"type": "module",
"scripts": {
"predev": "tsx ./scripts/build-fonts.ts",
"dev": "tsx --watch ./src/server.ts",
"prebuild": "tsx ./scripts/build-fonts.ts",
"build": "tsc --build",
"start": "node ./dist/server.js",
"test": "node --test tests/*.js"
Expand All @@ -21,22 +23,22 @@
"@dicebear/api-9": "*",
"@dicebear/converter": "^9.0.0",
"@fastify/cors": "^8.4.0",
"@fontsource/noto-sans": "^5.0.22",
"@fontsource/noto-sans-jp": "^5.0.19",
"@fontsource/noto-sans-kr": "^5.0.19",
"@fontsource/noto-sans-sc": "^5.0.19",
"@fontsource/noto-sans-thai": "^5.0.14",
"@woff2/woff2-rs": "^1.0.1",
"change-case": "^5.0.2",
"fastify": "^4.23.2",
"qs": "^6.11.2"
},
"devDependencies": {
"@dicebear/core": "^7.0.1",
"@fontsource/noto-sans": "^5.0.22",
"@fontsource/noto-sans-jp": "^5.0.19",
"@fontsource/noto-sans-kr": "^5.0.19",
"@fontsource/noto-sans-sc": "^5.0.19",
"@fontsource/noto-sans-thai": "^5.0.14",
"@tsconfig/node20": "^20.1.4",
"@types/json-schema": "^7.0.13",
"@types/node": "^20.14.2",
"@types/qs": "^6.9.8",
"@woff2/woff2-rs": "^1.0.1",
"prettier": "^2.4.1",
"tsx": "^3.13.0",
"typescript": "^5.2.2"
Expand Down
Loading

0 comments on commit cb09aca

Please sign in to comment.