Skip to content

Commit 1842b2b

Browse files
authored
chore: usage of build scripts (#11093)
- Stop CEM logs after CEM generation. Previously, a patch handled this, but it has now been removed. Instead, use `cross-env UI5_CEM_MODE='dev'` to achieve the same effect. - The correct path to the CSS variable usage script has been fixed, ensuring the report is now generated correctly.
1 parent 5bacb8b commit 1842b2b

File tree

4 files changed

+71
-32
lines changed

4 files changed

+71
-32
lines changed

packages/base/package-scripts.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ const scripts = {
4949
},
5050
generateAPI: {
5151
default: "nps generateAPI.generateCEM generateAPI.validateCEM",
52-
generateCEM: `cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs" --dev`,
53-
validateCEM: `node "${LIB}/cem/validate.js" --dev`,
52+
generateCEM: `cross-env UI5_CEM_MODE='dev' cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs"`,
53+
validateCEM: `cross-env UI5_CEM_MODE='dev' node "${LIB}/cem/validate.js"`,
5454
},
5555
watch: {
5656
default: 'concurrently "nps watch.src" "nps watch.styles"',

packages/theming/css-vars-usage.json

Lines changed: 61 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,46 @@
1212
"--sapActiveColor",
1313
"--sapAvatar_1_Background",
1414
"--sapAvatar_1_BorderColor",
15+
"--sapAvatar_1_Hover_Background",
1516
"--sapAvatar_1_TextColor",
1617
"--sapAvatar_2_Background",
1718
"--sapAvatar_2_BorderColor",
19+
"--sapAvatar_2_Hover_Background",
1820
"--sapAvatar_2_TextColor",
1921
"--sapAvatar_3_Background",
2022
"--sapAvatar_3_BorderColor",
23+
"--sapAvatar_3_Hover_Background",
2124
"--sapAvatar_3_TextColor",
2225
"--sapAvatar_4_Background",
2326
"--sapAvatar_4_BorderColor",
27+
"--sapAvatar_4_Hover_Background",
2428
"--sapAvatar_4_TextColor",
2529
"--sapAvatar_5_Background",
2630
"--sapAvatar_5_BorderColor",
31+
"--sapAvatar_5_Hover_Background",
2732
"--sapAvatar_5_TextColor",
2833
"--sapAvatar_6_Background",
2934
"--sapAvatar_6_BorderColor",
35+
"--sapAvatar_6_Hover_Background",
3036
"--sapAvatar_6_TextColor",
3137
"--sapAvatar_7_Background",
3238
"--sapAvatar_7_BorderColor",
39+
"--sapAvatar_7_Hover_Background",
3340
"--sapAvatar_7_TextColor",
3441
"--sapAvatar_8_Background",
3542
"--sapAvatar_8_BorderColor",
43+
"--sapAvatar_8_Hover_Background",
3644
"--sapAvatar_8_TextColor",
3745
"--sapAvatar_9_Background",
3846
"--sapAvatar_9_BorderColor",
47+
"--sapAvatar_9_Hover_Background",
3948
"--sapAvatar_9_TextColor",
4049
"--sapAvatar_10_Background",
4150
"--sapAvatar_10_BorderColor",
51+
"--sapAvatar_10_Hover_Background",
4252
"--sapAvatar_10_TextColor",
53+
"--sapAvatar_Lite_Background",
54+
"--sapAvatar_Lite_BorderColor",
4355
"--sapBackgroundColor",
4456
"--sapBaseColor",
4557
"--sapBlockLayer_Background",
@@ -91,7 +103,6 @@
91103
"--sapButton_Emphasized_Active_TextColor",
92104
"--sapButton_Emphasized_Background",
93105
"--sapButton_Emphasized_BorderColor",
94-
"--sapButton_Emphasized_FontWeight",
95106
"--sapButton_Emphasized_Hover_Background",
96107
"--sapButton_Emphasized_Hover_BorderColor",
97108
"--sapButton_Emphasized_Hover_TextColor",
@@ -163,6 +174,7 @@
163174
"--sapButton_Reject_Selected_Hover_BorderColor",
164175
"--sapButton_Reject_Selected_TextColor",
165176
"--sapButton_Reject_TextColor",
177+
"--sapButton_Segment_BorderCornerRadius",
166178
"--sapButton_Selected_Background",
167179
"--sapButton_Selected_BorderColor",
168180
"--sapButton_Selected_Hover_Background",
@@ -197,6 +209,7 @@
197209
"--sapButton_Track_Selected_Hover_BorderColor",
198210
"--sapButton_Track_Selected_TextColor",
199211
"--sapContent_BadgeBackground",
212+
"--sapContent_BadgeBorderColor",
200213
"--sapContent_BadgeTextColor",
201214
"--sapContent_BusyColor",
202215
"--sapContent_ContentColor",
@@ -214,7 +227,6 @@
214227
"--sapContent_FocusWidth",
215228
"--sapContent_ForegroundBorderColor",
216229
"--sapContent_ForegroundColor",
217-
"--sapContent_ForegroundTextColor",
218230
"--sapContent_HeaderShadow",
219231
"--sapContent_HelpColor",
220232
"--sapContent_IconColor",
@@ -232,6 +244,7 @@
232244
"--sapContent_Informative_Shadow",
233245
"--sapContent_Interaction_Shadow",
234246
"--sapContent_LabelColor",
247+
"--sapContent_Lite_Shadow",
235248
"--sapContent_MeasureIndicatorColor",
236249
"--sapContent_Negative_Shadow",
237250
"--sapContent_NonInteractiveIconColor",
@@ -286,11 +299,17 @@
286299
"--sapField_InvalidBorderWidth",
287300
"--sapField_InvalidColor",
288301
"--sapField_InvalidShadow",
302+
"--sapField_Picker_BorderWidth",
289303
"--sapField_PlaceholderTextColor",
290304
"--sapField_ReadOnly_Background",
291305
"--sapField_ReadOnly_BackgroundStyle",
292306
"--sapField_ReadOnly_BorderColor",
293307
"--sapField_RequiredColor",
308+
"--sapField_Selector_Hover_Background",
309+
"--sapField_Selector_Hover_InformationBackground",
310+
"--sapField_Selector_Hover_InvalidBackground",
311+
"--sapField_Selector_Hover_SuccessBackground",
312+
"--sapField_Selector_Hover_WarningBackground",
294313
"--sapField_Shadow",
295314
"--sapField_SuccessBackground",
296315
"--sapField_SuccessBackgroundStyle",
@@ -315,16 +334,17 @@
315334
"--sapFontLargeSize",
316335
"--sapFontMediumSize",
317336
"--sapFontSemiboldDuplexFamily",
337+
"--sapFontSemiboldFamily",
318338
"--sapFontSize",
319339
"--sapFontSmallSize",
340+
"--sapGroup_BorderCornerRadius",
320341
"--sapGroup_ContentBackground",
321342
"--sapGroup_ContentBorderColor",
322343
"--sapGroup_Title_FontSize",
323344
"--sapGroup_TitleBackground",
324345
"--sapGroup_TitleBorderColor",
346+
"--sapGroup_TitleBorderWidth",
325347
"--sapGroup_TitleTextColor",
326-
"--sapHC_ReducedBackground",
327-
"--sapHC_ReducedForeground",
328348
"--sapHighlightColor",
329349
"--sapIllus_AccentColor",
330350
"--sapIllus_BackgroundColor",
@@ -454,16 +474,6 @@
454474
"--sapLegend_CurrentDateTime",
455475
"--sapLegend_NonWorkingBackground",
456476
"--sapLegend_WorkingBackground",
457-
"--sapLegendBackgroundColor1",
458-
"--sapLegendBackgroundColor2",
459-
"--sapLegendBackgroundColor3",
460-
"--sapLegendBackgroundColor5",
461-
"--sapLegendBackgroundColor6",
462-
"--sapLegendBackgroundColor7",
463-
"--sapLegendBackgroundColor9",
464-
"--sapLegendBackgroundColor10",
465-
"--sapLegendBackgroundColor18",
466-
"--sapLegendBackgroundColor20",
467477
"--sapLegendColor1",
468478
"--sapLegendColor2",
469479
"--sapLegendColor3",
@@ -508,10 +518,10 @@
508518
"--sapList_Hover_SelectionBackground",
509519
"--sapList_SelectionBackgroundColor",
510520
"--sapList_SelectionBorderColor",
511-
"--sapList_TableGroupHeaderBackground",
512-
"--sapList_TableGroupHeaderBorderColor",
513521
"--sapList_TableGroupHeaderTextColor",
514522
"--sapList_TextColor",
523+
"--sapMessage_BorderWidth",
524+
"--sapMessage_Button_Hover_Background",
515525
"--sapMessage_ErrorBorderColor",
516526
"--sapMessage_InformationBorderColor",
517527
"--sapMessage_SuccessBorderColor",
@@ -550,18 +560,13 @@
550560
"--sapProgress_PositiveBackground",
551561
"--sapProgress_TextColor",
552562
"--sapProgress_Value_Background",
553-
"--sapProgress_Value_BorderColor",
554563
"--sapProgress_Value_CriticalBackground",
555-
"--sapProgress_Value_CriticalBorderColor",
556564
"--sapProgress_Value_CriticalTextColor",
557565
"--sapProgress_Value_InformationBackground",
558-
"--sapProgress_Value_InformationBorderColor",
559566
"--sapProgress_Value_InformationTextColor",
560567
"--sapProgress_Value_NegativeBackground",
561-
"--sapProgress_Value_NegativeBorderColor",
562568
"--sapProgress_Value_NegativeTextColor",
563569
"--sapProgress_Value_PositiveBackground",
564-
"--sapProgress_Value_PositiveBorderColor",
565570
"--sapProgress_Value_PositiveTextColor",
566571
"--sapScrollBar_Dimension",
567572
"--sapScrollBar_FaceColor",
@@ -570,11 +575,14 @@
570575
"--sapSelectedColor",
571576
"--sapShell_Active_Background",
572577
"--sapShell_Active_TextColor",
578+
"--sapShell_Assistant_ForegroundColor",
573579
"--sapShell_Background",
574580
"--sapShell_Hover_Background",
575581
"--sapShell_InteractiveBackground",
576582
"--sapShell_InteractiveBorderColor",
577583
"--sapShell_InteractiveTextColor",
584+
"--sapShell_Shadow",
585+
"--sapShell_SubBrand_TextColor",
578586
"--sapShell_TextColor",
579587
"--sapShellColor",
580588
"--sapSlider_Active_RangeHandleBackground",
@@ -588,6 +596,38 @@
588596
"--sapSlider_Selected_BorderColor",
589597
"--sapSuccessBackground",
590598
"--sapSuccessBorderColor",
599+
"--sapTab_Background",
600+
"--sapTab_Critical_ForegroundColor",
601+
"--sapTab_Critical_IconColor",
602+
"--sapTab_Critical_Selected_Background",
603+
"--sapTab_Critical_Selected_IconColor",
604+
"--sapTab_Critical_Selected_TextColor",
605+
"--sapTab_Critical_TextColor",
606+
"--sapTab_ForegroundColor",
607+
"--sapTab_IconColor",
608+
"--sapTab_Negative_ForegroundColor",
609+
"--sapTab_Negative_IconColor",
610+
"--sapTab_Negative_Selected_Background",
611+
"--sapTab_Negative_Selected_IconColor",
612+
"--sapTab_Negative_Selected_TextColor",
613+
"--sapTab_Negative_TextColor",
614+
"--sapTab_Neutral_ForegroundColor",
615+
"--sapTab_Neutral_IconColor",
616+
"--sapTab_Neutral_Selected_Background",
617+
"--sapTab_Neutral_Selected_IconColor",
618+
"--sapTab_Neutral_Selected_TextColor",
619+
"--sapTab_Neutral_TextColor",
620+
"--sapTab_Positive_ForegroundColor",
621+
"--sapTab_Positive_IconColor",
622+
"--sapTab_Positive_Selected_Background",
623+
"--sapTab_Positive_Selected_IconColor",
624+
"--sapTab_Positive_Selected_TextColor",
625+
"--sapTab_Positive_TextColor",
626+
"--sapTab_Selected_Background",
627+
"--sapTab_Selected_IconColor",
628+
"--sapTab_Selected_Indicator_Dimension",
629+
"--sapTab_Selected_TextColor",
630+
"--sapTab_TextColor",
591631
"--sapTextColor",
592632
"--sapTile_Active_Background",
593633
"--sapTile_Background",
@@ -599,7 +639,6 @@
599639
"--sapTile_SeparatorColor",
600640
"--sapTile_TextColor",
601641
"--sapTile_TitleTextColor",
602-
"--sapToolbar_Background",
603642
"--sapToolbar_SeparatorColor",
604643
"--sapWarningBackground",
605644
"--sapWarningBorderColor"

packages/theming/package-scripts.cjs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
const resolve = require("resolve");
2-
const assets = require('@ui5/webcomponents-tools/assets-meta.js');
31
const path = require('path');
42

5-
const jsonImportsScript = resolve.sync("@ui5/webcomponents-tools/lib/generate-json-imports/themes.js");
6-
const generateReportScript = resolve.sync("@ui5/webcomponents-theming/lib/generate-css-vars-usage-report/index.js");
73

8-
const LIB = path.join(__dirname, `../tools/lib/`);
4+
const CURRENT_LIB = path.join(__dirname, `./lib/`);
5+
const TOOLS_LIB = path.join(__dirname, `../tools/lib/`);
6+
7+
const jsonImportsScript = path.join(TOOLS_LIB, "./generate-json-imports/themes.js");
8+
const generateReportScript = path.join(CURRENT_LIB, "./generate-css-vars-usage-report/index.js");
9+
910

1011
module.exports = {
1112
scripts: {
@@ -15,7 +16,7 @@ module.exports = {
1516
default: `cross-env UI5_TS=true nps clean build.src build.postcss build.jsonImports build.typescript generateReport`,
1617
src: `copy-and-watch "src/**/*.{json}" dist/`,
1718
typescript: "tsc",
18-
postcss: `node "${LIB}/css-processors/css-processor-themes.mjs"`,
19+
postcss: `node "${TOOLS_LIB}/css-processors/css-processor-themes.mjs"`,
1920
jsonImports: `node "${jsonImportsScript}" dist/generated/assets/themes src/generated/json-imports`,
2021
},
2122
generateReport: `node "${generateReportScript}"`,

packages/theming/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
"json-beautify": "^1.1.1",
4040
"nps": "^5.10.0",
4141
"postcss": "^8.4.5",
42-
"postcss-import": "^14.0.2",
43-
"resolve": "^1.20.0"
42+
"postcss-import": "^14.0.2"
4443
},
4544
"resolutions": {}
4645
}

0 commit comments

Comments
 (0)