Skip to content

Commit bf855d1

Browse files
authored
Merge pull request #772 from pheralb/dev
✨ svgl v5
2 parents 1e0bb95 + 9cf1677 commit bf855d1

File tree

290 files changed

+13375
-9104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

290 files changed

+13375
-9104
lines changed

.dockerignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Dockerfile
2+
.dockerignore
3+
.git
4+
.gitignore
5+
.gitattributes
6+
README.md
7+
.npmrc
8+
.prettierrc
9+
prettier.config.mjs
10+
.eslintrc.cjs
11+
eslint.config.mjs
12+
.graphqlrc
13+
.editorconfig
14+
.svelte-kit
15+
.vscode
16+
node_modules
17+
build
18+
package
19+
**/.env

.eslintignore

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/build-app.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- dev
78

89
jobs:
910
build-app:
@@ -12,17 +13,26 @@ jobs:
1213
steps:
1314
- uses: actions/checkout@v4
1415

15-
- name: Setup pnpm 9
16+
- name: Setup pnpm
1617
uses: pnpm/action-setup@v4
18+
19+
- name: Get pnpm store directory
20+
shell: bash
21+
run: |
22+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
23+
24+
- name: Setup pnpm cache
25+
uses: actions/cache@v4
1726
with:
18-
version: 9
27+
path: ${{ env.STORE_PATH }}
28+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
29+
restore-keys: |
30+
${{ runner.os }}-pnpm-store-
1931
2032
- name: Install dependencies
21-
run: pnpm install
33+
run: pnpm install --frozen-lockfile
2234

2335
- name: Build app
24-
run: pnpm vite:build
36+
run: pnpm build
2537
env:
26-
UPSTASH_REDIS_TOKEN: ${{ secrets.UPSTASH_REDIS_TOKEN }}
27-
UPSTASH_REDIS_URL: ${{ secrets.UPSTASH_REDIS_URL }}
28-
SVGL_API_REQUESTS: ${{ secrets.SVGL_API_REQUESTS }}
38+
PUBLIC_SVGL_VERSION: v5

.github/workflows/check-app.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,41 @@ on:
44
push:
55
branches:
66
- main
7-
- next
7+
- dev
88
pull_request:
99
branches:
1010
- main
11-
- next
11+
- dev
1212

1313
jobs:
14-
vitest:
14+
lint:
1515
runs-on: ubuntu-latest
16-
name: ⚡ Testing with Vitest
16+
name: ⚙️ Linting
1717
steps:
1818
- uses: actions/checkout@v4
1919

20-
- name: Setup pnpm 9
20+
- name: Setup pnpm
2121
uses: pnpm/action-setup@v4
22-
with:
23-
version: 9
2422

2523
- name: Install dependencies
2624
run: pnpm install
2725

28-
- name: Run Vitest
29-
run: pnpm test
26+
- name: Run Eslint
27+
run: pnpm lint
28+
env:
29+
PUBLIC_SVGL_VERSION: v5
3030

3131
svgs-size:
3232
runs-on: ubuntu-latest
3333
name: 📦 SVGs Size
3434
steps:
3535
- uses: actions/checkout@v4
3636

37-
- name: Setup pnpm 9
37+
- name: Setup pnpm
3838
uses: pnpm/action-setup@v4
39-
with:
40-
version: 9
4139

42-
- name: Install utility dependencies
40+
- name: Install dependencies
4341
run: pnpm install
44-
working-directory: ./utils/check-size
4542

46-
- name: Check svgs size
47-
run: pnpm start
48-
working-directory: ./utils/check-size
43+
- name: Check SVGs size
44+
run: pnpm check:size

.github/workflows/deploy-api.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414

15-
- name: Setup pnpm 9
16-
uses: pnpm/action-setup@v2
15+
- name: Setup pnpm 10
16+
uses: pnpm/action-setup@v4
1717
with:
18-
version: 9
18+
version: 10
1919

2020
- name: Install global dependencies
2121
run: pnpm install
@@ -25,4 +25,4 @@ jobs:
2525
with:
2626
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
2727
packageManager: pnpm
28-
workingDirectory: 'api-routes'
28+
workingDirectory: "api-routes"

.gitignore

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
11
# Dependencies
22
node_modules
3-
package-lock.json
4-
yarn.lock
53

6-
# Folders
7-
/.svelte-kit
8-
/build
9-
dist
10-
/package
11-
.idea/
12-
13-
# Hono
14-
.wrangler
15-
.dev.vars
4+
# Content Collections
5+
.content-collections
166

17-
# Vercel
7+
# Output
8+
.output
189
.vercel
10+
.netlify
11+
.wrangler
12+
/.svelte-kit
13+
/build
1914

20-
# Logs
15+
# OS
2116
.DS_Store
17+
Thumbs.db
2218

23-
# Environment variables
19+
# Env
2420
.env
2521
.env.*
2622
!.env.example
23+
!.env.test
2724

28-
# Vite files
25+
# Vite
2926
vite.config.js.timestamp-*
3027
vite.config.ts.timestamp-*
31-
src/figma/dist
32-
33-
# Lychee files
34-
.lycheecache

.prettierignore

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
.DS_Store
2-
node_modules
3-
/build
4-
/.svelte-kit
5-
/package
6-
.env
7-
.env.*
8-
!.env.example
9-
10-
# Ignore files for PNPM, NPM and YARN
11-
pnpm-lock.yaml
1+
# Package Managers
122
package-lock.json
3+
pnpm-lock.yaml
134
yarn.lock
5+
bun.lock
6+
bun.lockb
7+
8+
# Miscellaneous
9+
/static/

Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM node:22.17.0-alpine AS base
2+
3+
# Install pnpm
4+
RUN npm install -g pnpm@10.13.1
5+
6+
# Set working directory
7+
WORKDIR /app
8+
9+
# Install dependencies with cache
10+
FROM base AS deps
11+
COPY package.json pnpm-lock.yaml ./
12+
RUN pnpm install --frozen-lockfile
13+
14+
# Build the application
15+
FROM base AS builder
16+
COPY --from=deps /app/node_modules ./node_modules
17+
COPY . .
18+
RUN pnpm run check:size
19+
RUN pnpm run build:prod
20+
21+
# Production image
22+
FROM node:22.17.0-alpine AS runner
23+
WORKDIR /app
24+
25+
# Copy necessary files from builder
26+
COPY --from=builder /app/build ./build
27+
COPY --from=builder /app/node_modules ./node_modules
28+
COPY package.json ./
29+
30+
# Set production environment
31+
ENV NODE_ENV=production
32+
33+
# Expose port
34+
EXPOSE 3000
35+
36+
# Start the server
37+
CMD ["node", "build"]

0 commit comments

Comments
 (0)