Skip to content

Commit a441d0c

Browse files
mfranzkemichaelmkrausnmerget
authored
refactor: updated DB Theme (#6008)
* refactor: updated DB Theme * refactor: updated DB Theme package * refactor: regenerated package lock file * refactor: Add missing node command for DB Theme package build (#6011) * refactor: extracting node calls to central script easier to run yourself or run within several places, as the scripts we need to call increased to four. * Apply suggestions from code review * Update package.json Co-authored-by: Michael Kraus <[email protected]> * refactor: updated DB Theme package * Update package.json Co-authored-by: Nicolas Merget <[email protected]> * refactor: added individual scripts * refactor: added relevant scripts --------- Co-authored-by: Michael Kraus <[email protected]> Co-authored-by: Nicolas Merget <[email protected]>
1 parent 1073c46 commit a441d0c

8 files changed

Lines changed: 25 additions & 25 deletions

File tree

.github/copilot-instructions.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ DB UX Design System v3 Core Web is a monorepo containing CSS/SCSS styles, compon
3030

3131
3. **Decode DB Theme assets** (optional for basic development):
3232
```bash
33-
node node_modules/@db-ux/db-theme-fonts/build/scripts/index.js
34-
node node_modules/@db-ux/db-theme-icons/build/scripts/index.js
35-
node node_modules/@db-ux/db-theme-illustrative-icons/build/scripts/index.js
33+
npm run decode-db-theme-assets
3634
```
3735
**NOTE**: These will fail with placeholder credentials in `.env` but are not required for basic development.
3836

.github/workflows/01-build-patternhub.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ jobs:
4747
ASSET_PASSWORD: ${{ secrets.ASSET_PASSWORD }}
4848
NEXT_PUBLIC_BASE_PATH: ${{ inputs.baseUrl }}
4949
run: |
50-
node node_modules/@db-ux/db-theme-fonts/build/scripts/index.js
51-
node node_modules/@db-ux/db-theme-icons/build/scripts/index.js
50+
npm run decode-db-theme-assets
5251
npx --no tsx scripts/md-resolve-svg.ts
5352
npm run build --workspace=patternhub
5453
echo "path=${NEXT_PUBLIC_BASE_PATH}" >> $GITHUB_OUTPUT

.github/workflows/01-build-showcases.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ jobs:
4545
ASSET_INIT_VECTOR: ${{ secrets.ASSET_INIT_VECTOR }}
4646
ASSET_PASSWORD: ${{ secrets.ASSET_PASSWORD }}
4747
run: |
48-
node node_modules/@db-ux/db-theme-fonts/build/scripts/index.js
49-
node node_modules/@db-ux/db-theme-icons/build/scripts/index.js
48+
npm run decode-db-theme-assets
5049
npm run build --workspace=${{ inputs.showcase }}
5150
5251
- name: ⏫ Upload ${{ inputs.showcase }}

.github/workflows/01-build-storybooks.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ jobs:
5656
ASSET_PASSWORD: ${{ secrets.ASSET_PASSWORD }}
5757
BASE_URL: ${{ inputs.baseUrl }}
5858
run: |
59-
node node_modules/@db-ux/db-theme-fonts/build/scripts/index.js
60-
node node_modules/@db-ux/db-theme-icons/build/scripts/index.js
59+
npm run decode-db-theme-assets
6160
npm run build --workspace=${{ inputs.storybook }}
6261
6362
- name: ⏫ Upload ${{ inputs.storybook }}

CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ Get credentials for public usage from [Marketingportal](https://marketingportal.
1212
npm install
1313
# it should run postinstall tasks from @db-ux/db-theme* by default, if not:
1414
# execute this tasks manually to decode the assets using the previously made setup:
15-
node node_modules/@db-ux/db-theme-fonts/build/scripts/index.js
16-
node node_modules/@db-ux/db-theme-icons/build/scripts/index.js
17-
node node_modules/@db-ux/db-theme-illustrative-icons/build/scripts/index.js
15+
npm run decode-db-theme-assets
1816
```
1917

2018
If you're contributing from a fork in your user space, please also set up those credentials from the Marketing portal in your fork repository as repository secrets. You need these credentials for the pipeline to decrypt the brand assets correctly.

package-lock.json

Lines changed: 13 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"clean": "git clean -dfx --exclude=.env",
5757
"codestyle": "prettier . --write",
5858
"commit:updated-snapshots": "git diff --name-only --diff-filter=M | xargs git add && git commit --message 'test: updated snapshots'",
59+
"decode-db-theme-assets": "npm run decode-db-theme-assets --workspace=scripts",
5960
"dev": "npm run dev --workspace=scripts",
6061
"generate:agent": "npm run agent --workspace=scripts",
6162
"generate:component": "npm run generate:component --workspace=@db-ux/core-components",
@@ -103,7 +104,7 @@
103104
"@changesets/types": "6.1.0",
104105
"@commitlint/cli": "20.4.1",
105106
"@commitlint/config-conventional": "20.4.1",
106-
"@db-ux/db-theme": "5.3.1",
107+
"@db-ux/db-theme": "5.4.2",
107108
"@double-great/stylelint-a11y": "3.4.1",
108109
"@guidepup/guidepup": "0.24.1",
109110
"@guidepup/playwright": "0.15.0",

scripts/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
"build:foundations": "npm run build --workspace=@db-ux/core-foundations",
4646
"build:migration": "npm run build --workspace=@db-ux/core-migration",
4747
"build:stylelint": "npm run build --workspace=@db-ux/core-stylelint",
48+
"decode-db-theme-assets": "npm-run-all --parallel decode-db-theme-assets:*",
49+
"decode-db-theme-assets:db-theme": "node ../node_modules/@db-ux/db-theme/build/scripts/index.js",
50+
"decode-db-theme-assets:db-theme-fonts": "node ../node_modules/@db-ux/db-theme-fonts/build/scripts/index.js",
51+
"decode-db-theme-assets:db-theme-icons": "node ../node_modules/@db-ux/db-theme-icons/build/scripts/index.js",
52+
"decode-db-theme-assets:db-theme-illustrative-icons": "node ../node_modules/@db-ux/db-theme-illustrative-icons/build/scripts/index.js",
4853
"dev": "tsx dev.js",
4954
"dev:angular-components": "npm run dev:angular --workspace=@db-ux/core-components",
5055
"dev:plain-html-components": "npm run dev:html --workspace=@db-ux/core-components",

0 commit comments

Comments
 (0)