Skip to content
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c732624
feat: add vite-plugin to resolve CSS automatically based on detected …
nmerget Feb 13, 2026
4ec6a28
chore: update vite-plugin to detect tailwind
nmerget Feb 14, 2026
950b819
chore: align some functions inside vite plugin
nmerget Feb 14, 2026
6b15a82
chore: fix issue with vue build
nmerget Feb 14, 2026
32b0968
fix: issue with react build
nmerget Feb 14, 2026
b0cb8e6
fix: add CHANGELOG.md to vite plugin
nmerget Feb 14, 2026
d2064de
fix: issue with missing copy
nmerget Feb 14, 2026
f8908a1
fix: issue with missing builds
nmerget Feb 15, 2026
c944442
chore: update snapshot
nmerget Feb 18, 2026
c73bb00
fix: issue with test for vite-plugin
nmerget Feb 19, 2026
4d9038c
chore: update snapshot
nmerget Feb 19, 2026
840faac
chore: update tests
nmerget Feb 20, 2026
5f4eac5
chore: update snapshot
nmerget Feb 20, 2026
e82a1cf
chore: update from main
nmerget Feb 20, 2026
e75a5ac
chore: update test
nmerget Feb 20, 2026
de757db
fix: issues from PR
nmerget Mar 3, 2026
11c8672
Merge remote-tracking branch 'origin/main' into feat-vite-plugin
nmerget Mar 3, 2026
25f8c3b
Merge remote-tracking branch 'origin/main' into feat-vite-plugin
nmerget Mar 4, 2026
5b5ed76
chore: update changeset config
nmerget Mar 4, 2026
b0db8d7
chore: update package-lock.json
nmerget Mar 4, 2026
b1976c8
Merge branch 'main' into feat-vite-plugin
michaelmkraus Mar 5, 2026
102d076
Merge branch 'main' into feat-vite-plugin
michaelmkraus Mar 5, 2026
95b044b
Merge branch 'main' into feat-vite-plugin
michaelmkraus Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"@db-ux/core-stylelint",
"@db-ux/core-migration",
"@db-ux/agent-cli",
"@db-ux/core-eslint-plugin"
"@db-ux/core-eslint-plugin",
"@db-ux/core-vite-plugin"
]
],
"ignore": [
Expand Down
5 changes: 5 additions & 0 deletions .changeset/three-baboons-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@db-ux/core-vite-plugin": minor
---

feat: add vite-plugin to resolve CSS automatically based on detected components and styles
1 change: 1 addition & 0 deletions .config/.jscpd.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"**/README.md",
"**/test-results/**",
"**/tests/**",
"**/test/**",
"**/tsconfig.json",
"**/e2e/**/*.spec.ts",
"**/packages/components/scripts/post-build/components.ts",
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/01-build-outputs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ jobs:
name: db-ux-eslint-plugin-build
path: packages/eslint-plugin/build

- name: ⏬ Download vite-plugin build
uses: actions/download-artifact@v7
with:
name: db-ux-vite-plugin-build
path: packages/vite-plugin/build

- name: ⏬ Download agent-cli build
uses: actions/download-artifact@v8
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/01-build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ jobs:
name: db-ux-eslint-plugin-build
path: packages/eslint-plugin/build

- name: ⏫ Upload vite-plugin build
uses: actions/upload-artifact@v6
with:
name: db-ux-vite-plugin-build
path: packages/vite-plugin/build

- name: ⏫ Upload agent-cli build
uses: actions/upload-artifact@v6
with:
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/02-vite-plugin-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Vite Plugin Test

permissions:
contents: read

on:
workflow_call:

jobs:
test-vite-plugin:
name: Test Vite Plugin
runs-on: ubuntu-24.04
steps:
- name: ⏬ Checkout repo
uses: actions/checkout@v6

- name: 🔄 Init Cache
uses: ./.github/actions/npm-cache

- name: ⏬ Download foundations build
uses: actions/download-artifact@v7
with:
name: db-ux-foundations-build
path: packages/foundations/build

- name: ⏬ Download output
uses: actions/download-artifact@v7
with:
name: db-ux-output
path: output

- name: ⏬ Download components build
uses: actions/download-artifact@v7
with:
name: db-ux-components-build
path: packages/components/build

- name: 🧪 Run Vite Plugin Tests
run: npm run test --workspace @db-ux/core-vite-plugin
7 changes: 7 additions & 0 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ jobs:
secrets: inherit
needs: [build-outputs]

test-vite-plugin:
uses: ./.github/workflows/02-vite-plugin-test.yml
needs: [build-outputs]

test-components:
uses: ./.github/workflows/02-e2e.yml
needs: [build-packages, init]
Expand Down Expand Up @@ -407,6 +411,7 @@ jobs:
resultBuildShowcaseNuxt="${{ needs.build-showcase-nuxt.result }}"
resultBuildShowcasePatternhub="${{ needs.build-showcase-patternhub.result }}"
resultBuildOutputs="${{ needs.build-outputs.result }}"
resultTestVitePlugin="${{ needs.test-vite-plugin.result }}"
resultTestPackages="${{ needs.test-components.result }}"
resultTestFoundations="${{ needs.test-foundations.result }}"
resultTestShowcaseStencil="${{ needs.test-showcase-stencil.result }}"
Expand All @@ -428,6 +433,7 @@ jobs:
[[ $resultTestShowcaseVue == "success" ]] && \
[[ $resultTestShowcasePatternhub == "success" ]] && \
[[ $resultTestPackages == "success" ]] && \
[[ $resultTestVitePlugin == "success" ]] && \
[[ $resultBuildOutputs == "success" ]] && \
[[ $resultBuildShowcaseStencil == "success" ]] && \
[[ $resultBuildShowcaseAngular == "success" ]] && \
Expand Down Expand Up @@ -459,6 +465,7 @@ jobs:
build-showcase-patternhub,
build-outputs,
test-components,
test-vite-plugin,
test-showcase-stencil,
test-showcase-angular,
test-showcase-react,
Expand Down
20 changes: 18 additions & 2 deletions package-lock.json

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
inject: true
to: ../vite-plugin/src/detector.ts
after: const VALID_COMPONENTS = [
skip_if: '<%= name %>'
---
'<%= name %>',
4 changes: 4 additions & 0 deletions packages/foundations/scss/defaults/default-root.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
@extend %db-neutral-bg-basic-level-1;
@extend %db-density-regular;
}

[data-mode] {
@extend %db-neutral-bg-basic-level-1;
}
4 changes: 0 additions & 4 deletions packages/foundations/scss/defaults/default-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@
initial-value: "OpenSans Head", helvetica, arial, sans-serif;
inherits: true;
}

[data-mode] {
@extend %db-neutral-bg-basic-level-1;
}
2 changes: 2 additions & 0 deletions packages/vite-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# @db-ux/core-vite-plugin

51 changes: 51 additions & 0 deletions packages/vite-plugin/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
The DB source code is licensed under the Apache License, Version 2.0, January 2004;
you may not use this file except in compliance with the License. You may obtain a copy
of the Apache License at https://apache.org/licenses/LICENSE-2.0. The DB source code
does not include any DB specific design assets like fonts, icons, trademarks, brandings, etc.

All Deutsche Bahn AG (hereinafter “DB”) specific design assets like fonts, icons,
trademarks, brandings, etc. (hereinafter “DB Designs”) are licensed under the following
license agreement (the “DB Designs License”):

- The DB Designs may only be used by external users who are acting as contractors or
service providers for DB or a group company by virtue of a contractual relationship and
use the DB Designs in this context ("User"). A license agreement with third parties who
are not in a contractual relationship with DB or a group company is not possible.
- DB is and remains the owner or holds the exclusive usage rights to the DB Designs.
DB grants the User a royalty-free, non-exclusive, non-transferable, and non-sublicensable
right, limited geographically, temporally, and in content to the duration and purposes
of the contractual relationship with DB or a group company, to use the DB Designs in
accordance with this license agreement.
- The User may use the DB Designs only in connection with or for the fulfillment of
orders and/or services that they provide for DB or a group company. Any other use,
particularly for private personal purposes or for unauthorized third parties, is
prohibited. The User may not sublicense, distribute, or otherwise make the DB Designs
accessible to third parties who are not part of DB AG or a group company, unless this
is expressly permitted by the underlying contractual relationship between the User and
DB or the group company. The User may not modify, alter, convert, edit, reverse engineer,
or decompile the DB Designs; in particular, they may not make any graphical changes
and/or alter, remove, or add technical functions. Editing or using the DB Designs in
an altered form is only permitted with the express prior written consent of DB.
- Unless required by applicable law or agreed to in writing, DB provides the DB Designs
on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions of title,
non-infringement, merchantability, or fitness for a particular purpose. DB is only liable
in cases of intent or gross negligence, within the framework of mandatory statutory
liability provisions, particularly the Product Liability Act, as well as for damages
arising from injury to life, body, or health of individuals. In cases of gross negligence,
liability is limited to typical and foreseeable damages. This limitation of liability also
applies in favor of group companies as well as in favor of vicarious agents of DB and
its group companies.
- This DB Designs License automatically ends at the time when the underlying contractual
relationship between the user and DB or a group company ends. DB may terminate this
DB Designs License at any time without notice for good cause, in particular, if the User
violates this DB Designs License and does not cease the violation within a reasonable
period after a warning. The User is obligated to cease using the DB Designs immediately
upon termination of this DB Designs License and to delete all DB Designs and related files
in their possession or installed on their systems, as well as any backup copies, without delay.
- If any provision of this agreement is or becomes invalid or unenforceable, the remaining
provisions of this agreement shall remain unaffected. In place of the invalid or unenforceable
provision, a provision shall be deemed agreed upon that comes closest to the economic purpose
of the invalid or unenforceable provision in a legally permissible manner. The same applies in
the event of a gap in the agreement. This DB Designs License is governed by and construed in
accordance with the laws of Germany, excluding conflicts of law rules and principles.
Loading
Loading