Skip to content

Commit cc18302

Browse files
refactor(eds-demo): 4205 move demo app to apps folder (#4214)
- Moved from packages/eds-demo to apps/eds-demo - Updated DockerfileEdsDemo to build tokens before demo - Updated root package.json scripts - Updated .github/workflows/visual-tests.yml paths - All builds and tests passing BREAKING CHANGE: Demo app location changed from packages/eds-demo to apps/eds-demo"
1 parent c834856 commit cc18302

60 files changed

Lines changed: 103 additions & 88 deletions

Some content is hidden

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

DockerfileEdsDemo

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ COPY . ./
1616
# Install dependencies first
1717
RUN pnpm install --frozen-lockfile
1818

19-
# Build CLI tools first, then reinstall to create binary links, then build variables & demo
20-
RUN pnpm --filter eds-demo run build
19+
# Build tokens (which is a required dependency for demo), then build demo
20+
RUN pnpm --filter @equinor/eds-tokens run build && \
21+
pnpm --filter eds-demo run build
2122

2223
FROM node:22.12.0-alpine AS runner
2324
WORKDIR /app
@@ -34,14 +35,15 @@ RUN npm install -g pnpm@10.15.0 && \
3435
adduser -S --uid "$UID" "$USER" && \
3536
apk add --no-cache tini
3637

37-
# Copy just the essential built files and node_modules
38-
COPY --chown="$USER":"$USER" --from=build /app/packages/eds-demo ./packages/eds-demo
38+
# Copy just the essential built files, workspace dependencies, and node_modules
39+
COPY --chown="$USER":"$USER" --from=build /app/apps/eds-demo ./apps/eds-demo
40+
COPY --chown="$USER":"$USER" --from=build /app/packages/eds-tokens ./packages/eds-tokens
3941
COPY --chown="$USER":"$USER" --from=build /app/node_modules ./node_modules
4042

4143
USER "$UID"
4244

4345
EXPOSE 3000
4446

4547
ENTRYPOINT ["/sbin/tini", "--"]
46-
WORKDIR /app/packages/eds-demo
48+
WORKDIR /app/apps/eds-demo
4749
CMD ["pnpm", "start"]

apps/eds-color-palette-generator/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Metadata } from 'next'
1+
import type Metadata from 'next'
22
import { Geist, Geist_Mono } from 'next/font/google'
33
import '@equinor/eds-tokens/css/variables'
44
import './globals.css'
File renamed without changes.

packages/eds-demo/.github/workflows/visual-tests.yml renamed to apps/eds-demo/.github/workflows/visual-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ name: Visual Regression Tests
33
on:
44
pull_request:
55
paths:
6-
- "packages/eds-demo/**"
6+
- "apps/eds-demo/**"
77
push:
88
branches:
99
- main
1010
paths:
11-
- "packages/eds-demo/**"
11+
- "apps/eds-demo/**"
1212

1313
jobs:
1414
test:
1515
name: Run Visual Tests
1616
runs-on: ubuntu-latest
1717
defaults:
1818
run:
19-
working-directory: packages/eds-demo
19+
working-directory: apps/eds-demo
2020

2121
steps:
2222
- name: Checkout code
@@ -47,13 +47,13 @@ jobs:
4747
uses: actions/upload-artifact@v4
4848
with:
4949
name: playwright-report
50-
path: packages/eds-demo/playwright-report/
50+
path: apps/eds-demo/playwright-report/
5151
retention-days: 30
5252

5353
- name: Upload test failures
5454
if: failure()
5555
uses: actions/upload-artifact@v4
5656
with:
5757
name: test-results
58-
path: packages/eds-demo/test-results/
58+
path: apps/eds-demo/test-results/
5959
retention-days: 30

0 commit comments

Comments
 (0)