Skip to content

Commit d8e3ac6

Browse files
authored
Merge pull request #572 from dev-five-git/improve-dev
Improve dev
2 parents dd7f8d2 + 4ead9e6 commit d8e3ac6

17 files changed

Lines changed: 1995 additions & 510 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"changes":{"packages/eslint-plugin/package.json":"Patch","packages/next-plugin/package.json":"Patch","bindings/devup-ui-wasm/package.json":"Patch"},"note":"Refactor build and dev process","date":"2026-02-11T17:09:50.999761800Z"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"changes":{"bindings/devup-ui-wasm/package.json":"Patch"},"note":"Optimize","date":"2026-02-11T17:10:04.282365Z"}

.github/workflows/publish.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,43 @@ jobs:
9191
bun run --filter landing build
9292
- name: Install Playwright Browsers
9393
run: bunx playwright install chromium --with-deps
94+
- name: Check for Existing E2E Snapshots
95+
id: check-snapshots
96+
run: |
97+
SNAPSHOT_COUNT=$(find e2e -name '*.png' -path '*-snapshots/*' 2>/dev/null | wc -l)
98+
echo "count=$SNAPSHOT_COUNT" >> $GITHUB_OUTPUT
99+
echo "Found $SNAPSHOT_COUNT existing snapshot(s)"
100+
- name: Generate E2E Snapshots
101+
if: steps.check-snapshots.outputs.count == '0'
102+
run: bunx playwright test --update-snapshots
103+
- name: Commit E2E Snapshots
104+
if: steps.check-snapshots.outputs.count == '0' && github.event_name == 'pull_request'
105+
uses: stefanzweifel/git-auto-commit-action@v5
106+
with:
107+
commit_message: "chore: generate e2e visual snapshots from CI"
108+
file_pattern: "e2e/**/*-snapshots/*.png"
94109
- name: Run E2E Tests
95110
run: bun run test:e2e
96111
- name: Upload artifact
97-
uses: actions/upload-pages-artifact@v3
98-
with:
99-
path: ./apps/landing/out
100-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
101-
- uses: actions/deploy-pages@v4
102-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
112+
uses: actions/upload-pages-artifact@v3
113+
with:
114+
path: ./apps/landing/out
115+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
116+
- uses: actions/deploy-pages@v4
117+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
118+
- name: Build Landing (singleCss)
119+
run: |
120+
rm -rf apps/landing/out apps/landing/.next apps/landing/df
121+
DEVUP_SINGLE_CSS=1 bun run --filter landing build
122+
- name: Run E2E Tests (singleCss)
123+
run: bun run test:e2e
124+
- name: Upload singleCss Playwright Report
125+
uses: actions/upload-artifact@v4
126+
if: ${{ !cancelled() }}
127+
with:
128+
name: playwright-report-singlecss
129+
path: playwright-report/
130+
retention-days: 30
103131
- name: Upload to codecov.io
104132
uses: codecov/codecov-action@v5
105133
with:

apps/landing/next.config.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ const withMDX = createMDX({
66
})
77

88
export default withMDX(
9-
DevupUI({
10-
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
11-
output: 'export',
12-
reactCompiler: true,
13-
}),
9+
DevupUI(
10+
{
11+
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
12+
output: 'export',
13+
reactCompiler: true,
14+
},
15+
{
16+
singleCss: process.env.DEVUP_SINGLE_CSS === '1',
17+
},
18+
),
1419
)

bun.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/docs-pages.spec.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,17 @@ test.describe('Documentation Pages', () => {
185185
await context.close()
186186
})
187187

188-
// Dark mode screenshot requires JS for ThemeScript to set data-theme attribute.
189-
// With javaScriptEnabled: false, the theme cannot switch to dark mode.
190-
// Using colorScheme: 'dark' in context only sets prefers-color-scheme media,
191-
// which is insufficient if the app relies on a JS-driven theme class/attribute.
192-
test.skip('dark mode features section screenshot', async ({ browser }) => {
188+
test('dark mode features section screenshot', async ({ browser }) => {
193189
const context = await browser.newContext({
194-
javaScriptEnabled: false,
195190
viewport: { width: 1440, height: 900 },
196191
colorScheme: 'dark',
197192
})
198193
const page = await context.newPage()
199194
await page.goto('/')
195+
await page.waitForLoadState('networkidle')
196+
await page.evaluate(() =>
197+
document.documentElement.setAttribute('data-theme', 'dark'),
198+
)
200199
await page.waitForTimeout(500)
201200

202201
const features = page.getByText('Features').first()

packages/next-plugin/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@
5555
"@devup-ui/plugin-utils": "workspace:^",
5656
"@devup-ui/webpack-plugin": "workspace:^",
5757
"next": "^16.1",
58-
"@devup-ui/wasm": "workspace:^",
59-
"tinyglobby": "^0.2"
58+
"@devup-ui/wasm": "workspace:^"
6059
},
6160
"devDependencies": {
6261
"typescript": "^5.9",

0 commit comments

Comments
 (0)