@ui5/webcomponents-tools 0.0.0-3790e6927 → 0.0.0-38861c872

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +348 -0
  2. package/README.md +2 -1
  3. package/assets-meta.js +16 -7
  4. package/components-package/eslint.js +2 -0
  5. package/components-package/nps.js +37 -30
  6. package/components-package/postcss.components.js +1 -21
  7. package/components-package/postcss.themes.js +1 -36
  8. package/components-package/vite.config.js +0 -3
  9. package/components-package/wdio.js +6 -2
  10. package/icons-collection/nps.js +6 -4
  11. package/lib/cem/custom-elements-manifest.config.mjs +463 -0
  12. package/lib/cem/event.mjs +114 -0
  13. package/lib/cem/schema-internal.json +1354 -0
  14. package/lib/cem/schema.json +1098 -0
  15. package/lib/cem/types-internal.d.ts +1032 -0
  16. package/lib/cem/types.d.ts +871 -0
  17. package/lib/cem/utils.mjs +355 -0
  18. package/lib/cem/validate.js +63 -0
  19. package/lib/create-illustrations/index.js +32 -28
  20. package/lib/create-new-component/index.js +1 -1
  21. package/lib/create-new-component/tsFileContentTemplate.js +2 -11
  22. package/lib/css-processors/css-processor-components.mjs +77 -0
  23. package/lib/css-processors/css-processor-themes.mjs +79 -0
  24. package/lib/css-processors/scope-variables.mjs +46 -0
  25. package/lib/{postcss-css-to-esm/index.js → css-processors/shared.mjs} +36 -50
  26. package/lib/dev-server/custom-hot-update-plugin.js +39 -0
  27. package/lib/esm-abs-to-rel/index.js +4 -1
  28. package/lib/generate-custom-elements-manifest/index.js +1 -1
  29. package/lib/generate-js-imports/illustrations.js +78 -64
  30. package/lib/generate-json-imports/i18n.js +10 -5
  31. package/lib/generate-json-imports/themes.js +10 -5
  32. package/lib/jsdoc/preprocess.js +1 -1
  33. package/lib/postcss-combine-duplicated-selectors/index.js +12 -5
  34. package/lib/scoping/get-all-tags.js +1 -1
  35. package/lib/scoping/scope-test-pages.js +2 -1
  36. package/package.json +9 -10
  37. package/lib/postcss-css-to-json/index.js +0 -47
  38. package/lib/postcss-new-files/index.js +0 -36
  39. package/lib/postcss-p/postcss-p.mjs +0 -14
package/CHANGELOG.md CHANGED
@@ -3,6 +3,354 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.22.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.21.0...v1.22.0-rc.0) (2024-01-11)
7
+
8
+ **Note:** Version bump only for package @ui5/webcomponents-tools
9
+
10
+
11
+
12
+
13
+
14
+ # [1.21.0](https://github.com/SAP/ui5-webcomponents/compare/v1.21.0-rc.5...v1.21.0) (2024-01-05)
15
+
16
+ **Note:** Version bump only for package @ui5/webcomponents-tools
17
+
18
+
19
+
20
+
21
+
22
+ # [1.21.0-rc.5](https://github.com/SAP/ui5-webcomponents/compare/v1.21.0-rc.4...v1.21.0-rc.5) (2024-01-04)
23
+
24
+ **Note:** Version bump only for package @ui5/webcomponents-tools
25
+
26
+
27
+
28
+
29
+
30
+ # [1.21.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v1.21.0-rc.3...v1.21.0-rc.4) (2023-12-28)
31
+
32
+ **Note:** Version bump only for package @ui5/webcomponents-tools
33
+
34
+
35
+
36
+
37
+
38
+ # [1.21.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.21.0-rc.2...v1.21.0-rc.3) (2023-12-21)
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * declare webpackChunkName in more generated dynamic imports ([#8029](https://github.com/SAP/ui5-webcomponents/issues/8029)) ([c85fa23](https://github.com/SAP/ui5-webcomponents/commit/c85fa23bd32574434f537df95c7507a7f1a48b5e))
44
+
45
+
46
+ ### Features
47
+
48
+ * **tools:** Optimize build by switching css processing to esbuild ([#8008](https://github.com/SAP/ui5-webcomponents/issues/8008)) ([b4d411f](https://github.com/SAP/ui5-webcomponents/commit/b4d411f00f8d74ccecb2d02254126243faf53dfd))
49
+
50
+
51
+
52
+
53
+
54
+ # [1.21.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.21.0-rc.1...v1.21.0-rc.2) (2023-12-14)
55
+
56
+ **Note:** Version bump only for package @ui5/webcomponents-tools
57
+
58
+
59
+
60
+
61
+
62
+ # [1.21.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.21.0-rc.0...v1.21.0-rc.1) (2023-12-08)
63
+
64
+ **Note:** Version bump only for package @ui5/webcomponents-tools
65
+
66
+
67
+
68
+
69
+
70
+ # [1.21.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.20.0...v1.21.0-rc.0) (2023-12-07)
71
+
72
+ **Note:** Version bump only for package @ui5/webcomponents-tools
73
+
74
+
75
+
76
+
77
+
78
+ # [1.20.0](https://github.com/SAP/ui5-webcomponents/compare/v1.20.0-rc.3...v1.20.0) (2023-12-04)
79
+
80
+ **Note:** Version bump only for package @ui5/webcomponents-tools
81
+
82
+
83
+
84
+
85
+
86
+ # [1.20.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.20.0-rc.2...v1.20.0-rc.3) (2023-11-30)
87
+
88
+
89
+ ### Features
90
+
91
+ * register custom theme properties ([#7750](https://github.com/SAP/ui5-webcomponents/issues/7750)) ([c6c04c6](https://github.com/SAP/ui5-webcomponents/commit/c6c04c609d82a7442bdf79ef5bba46a406859a27))
92
+
93
+
94
+
95
+
96
+
97
+ # [1.20.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.20.0-rc.1...v1.20.0-rc.2) (2023-11-23)
98
+
99
+ **Note:** Version bump only for package @ui5/webcomponents-tools
100
+
101
+
102
+
103
+
104
+
105
+ # [1.20.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.20.0-rc.0...v1.20.0-rc.1) (2023-11-16)
106
+
107
+
108
+ ### Bug Fixes
109
+
110
+ * declare webpackChunkName in generated dynamic imports for readable runtime bundle names ([#7835](https://github.com/SAP/ui5-webcomponents/issues/7835)) ([592a10b](https://github.com/SAP/ui5-webcomponents/commit/592a10b25a14da89885874c40c5c7a192b8b4d85))
111
+
112
+
113
+
114
+
115
+
116
+ # [1.20.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.19.0...v1.20.0-rc.0) (2023-11-09)
117
+
118
+ **Note:** Version bump only for package @ui5/webcomponents-tools
119
+
120
+
121
+
122
+
123
+
124
+ # [1.19.0](https://github.com/SAP/ui5-webcomponents/compare/v1.19.0-rc.3...v1.19.0) (2023-11-02)
125
+
126
+ **Note:** Version bump only for package @ui5/webcomponents-tools
127
+
128
+
129
+
130
+
131
+
132
+ # [1.19.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.19.0-rc.2...v1.19.0-rc.3) (2023-11-02)
133
+
134
+
135
+ ### Features
136
+
137
+ * **framework:** switch default theme from Quartz Light to Morning Ho… ([#7749](https://github.com/SAP/ui5-webcomponents/issues/7749)) ([10dadd7](https://github.com/SAP/ui5-webcomponents/commit/10dadd79e3a93daf29baaed3a5bcebd8c66a0940))
138
+
139
+
140
+
141
+
142
+
143
+ # [1.19.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.19.0-rc.1...v1.19.0-rc.2) (2023-10-26)
144
+
145
+ **Note:** Version bump only for package @ui5/webcomponents-tools
146
+
147
+
148
+
149
+
150
+
151
+ # [1.19.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.19.0-rc.0...v1.19.0-rc.1) (2023-10-19)
152
+
153
+
154
+ ### Bug Fixes
155
+
156
+ * escape special characters when scoping CSS vars ([#7704](https://github.com/SAP/ui5-webcomponents/issues/7704)) ([8888751](https://github.com/SAP/ui5-webcomponents/commit/888875121b56fa0c7216674acc580620d8e0d720))
157
+
158
+
159
+
160
+
161
+
162
+ # [1.19.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.18.1-rc.0...v1.19.0-rc.0) (2023-10-12)
163
+
164
+ **Note:** Version bump only for package @ui5/webcomponents-tools
165
+
166
+
167
+
168
+
169
+
170
+ ## [1.18.1-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.18.0...v1.18.1-rc.0) (2023-10-05)
171
+
172
+ **Note:** Version bump only for package @ui5/webcomponents-tools
173
+
174
+
175
+
176
+
177
+
178
+ # [1.18.0](https://github.com/SAP/ui5-webcomponents/compare/v1.18.0-rc.2...v1.18.0) (2023-10-02)
179
+
180
+ **Note:** Version bump only for package @ui5/webcomponents-tools
181
+
182
+
183
+
184
+
185
+
186
+ # [1.18.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.18.0-rc.1...v1.18.0-rc.2) (2023-09-28)
187
+
188
+ **Note:** Version bump only for package @ui5/webcomponents-tools
189
+
190
+
191
+
192
+
193
+
194
+ # [1.18.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.18.0-rc.0...v1.18.0-rc.1) (2023-09-21)
195
+
196
+
197
+ ### Reverts
198
+
199
+ * Revert "build: fix dev server page refresh" ([105db9f](https://github.com/SAP/ui5-webcomponents/commit/105db9f3c42e7434c2dc9b0eb967fb45cac9620d))
200
+
201
+
202
+
203
+
204
+
205
+ # [1.18.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.17.0...v1.18.0-rc.0) (2023-09-07)
206
+
207
+ **Note:** Version bump only for package @ui5/webcomponents-tools
208
+
209
+
210
+
211
+
212
+
213
+ # [1.17.0](https://github.com/SAP/ui5-webcomponents/compare/v1.17.0-rc.2...v1.17.0) (2023-09-01)
214
+
215
+ **Note:** Version bump only for package @ui5/webcomponents-tools
216
+
217
+
218
+
219
+
220
+
221
+ # [1.17.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.17.0-rc.1...v1.17.0-rc.2) (2023-08-24)
222
+
223
+ **Note:** Version bump only for package @ui5/webcomponents-tools
224
+
225
+
226
+
227
+
228
+
229
+ # [1.17.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.17.0-rc.0...v1.17.0-rc.1) (2023-08-17)
230
+
231
+
232
+ ### Features
233
+
234
+ * **framework:** scope css variables per runtime and version ([#7449](https://github.com/SAP/ui5-webcomponents/issues/7449)) ([d3f6c2e](https://github.com/SAP/ui5-webcomponents/commit/d3f6c2efba9cfda389ea4d700a375f75b3e2996b))
235
+
236
+
237
+
238
+
239
+
240
+ # [1.17.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0...v1.17.0-rc.0) (2023-08-10)
241
+
242
+
243
+ ### Bug Fixes
244
+
245
+ * **ui5-illustrated-message:** support collection based illustration loading ([#7318](https://github.com/SAP/ui5-webcomponents/issues/7318)) ([6b52dbd](https://github.com/SAP/ui5-webcomponents/commit/6b52dbd157a3c8198e41c84157e3d9ae89e3386e))
246
+
247
+
248
+
249
+
250
+
251
+ # [1.16.0](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.4...v1.16.0) (2023-08-03)
252
+
253
+ **Note:** Version bump only for package @ui5/webcomponents-tools
254
+
255
+
256
+
257
+
258
+
259
+ # [1.16.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.3...v1.16.0-rc.4) (2023-08-03)
260
+
261
+ **Note:** Version bump only for package @ui5/webcomponents-tools
262
+
263
+
264
+
265
+
266
+
267
+ # [1.16.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.2...v1.16.0-rc.3) (2023-07-27)
268
+
269
+ **Note:** Version bump only for package @ui5/webcomponents-tools
270
+
271
+
272
+
273
+
274
+
275
+ # [1.16.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.1...v1.16.0-rc.2) (2023-07-20)
276
+
277
+ **Note:** Version bump only for package @ui5/webcomponents-tools
278
+
279
+
280
+
281
+
282
+
283
+ # [1.16.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.0...v1.16.0-rc.1) (2023-07-13)
284
+
285
+ **Note:** Version bump only for package @ui5/webcomponents-tools
286
+
287
+
288
+
289
+
290
+
291
+ # [1.16.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.15.1...v1.16.0-rc.0) (2023-07-06)
292
+
293
+ **Note:** Version bump only for package @ui5/webcomponents-tools
294
+
295
+
296
+
297
+
298
+
299
+ # [1.15.0](https://github.com/SAP/ui5-webcomponents/compare/v1.15.0-rc.2...v1.15.0) (2023-06-30)
300
+
301
+
302
+ ### Bug Fixes
303
+
304
+ * **framework:** missing CSS variables in compact mode / rtl mode ([#7189](https://github.com/SAP/ui5-webcomponents/issues/7189)) ([9b39b9c](https://github.com/SAP/ui5-webcomponents/commit/9b39b9ce5c3720dbb106c5638f858754e11a735f))
305
+
306
+
307
+
308
+
309
+
310
+ # [1.15.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.15.0-rc.1...v1.15.0-rc.2) (2023-06-22)
311
+
312
+ **Note:** Version bump only for package @ui5/webcomponents-tools
313
+
314
+
315
+
316
+
317
+
318
+ # [1.15.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.15.0-rc.0...v1.15.0-rc.1) (2023-06-15)
319
+
320
+ **Note:** Version bump only for package @ui5/webcomponents-tools
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+ # [1.15.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0...v1.15.0-rc.0) (2023-06-08)
331
+
332
+ **Note:** Version bump only for package @ui5/webcomponents-tools
333
+
334
+
335
+
336
+
337
+
338
+ # [1.14.0](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.2...v1.14.0) (2023-06-01)
339
+
340
+ **Note:** Version bump only for package @ui5/webcomponents-tools
341
+
342
+
343
+
344
+
345
+
346
+ # [1.14.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.1...v1.14.0-rc.2) (2023-06-01)
347
+
348
+ **Note:** Version bump only for package @ui5/webcomponents-tools
349
+
350
+
351
+
352
+
353
+
6
354
  # [1.14.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.0...v1.14.0-rc.1) (2023-05-25)
7
355
 
8
356
  **Note:** Version bump only for package @ui5/webcomponents-tools
package/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  ![UI5 icon](https://raw.githubusercontent.com/SAP/ui5-webcomponents/main/docs/images/UI5_logo_wide.png)
2
2
 
3
+
3
4
  # UI5 Web Components - Tools
4
5
 
5
6
  [![npm Package Version](https://badge.fury.io/js/%40ui5%2Fwebcomponents.svg)](https://www.npmjs.com/package/@ui5/webcomponents)
@@ -13,7 +14,7 @@ used by other UI5 Web Components packages, such as `main` and `fiori`.
13
14
  - [UI5 Web Components - Playground and API Reference](https://sap.github.io/ui5-webcomponents/playground/)
14
15
 
15
16
  ## Support
16
- We welcome all comments, suggestions, questions, and bug reports. Please follow our [Support Guidelines](https://github.com/SAP/ui5-webcomponents/blob/main/SUPPORT.md#-content) on how to report an issue, or chat with us in the `#webcomponents` channel of the [OpenUI5 Community Slack](https://join-ui5-slack.herokuapp.com/).
17
+ We welcome all comments, suggestions, questions, and bug reports. Please follow our [Support Guidelines](https://github.com/SAP/ui5-webcomponents/blob/main/SUPPORT.md#-content) on how to report an issue, or chat with us in the `#webcomponents` channel of the [OpenUI5 Community Slack](https://ui5-slack-invite.cfapps.eu10.hana.ondemand.com/).
17
18
 
18
19
  ## Contribute
19
20
  Please check our [Contribution Guidelines](https://github.com/SAP/ui5-webcomponents/blob/main/docs/6-contributing/02-conventions-and-guidelines.md).
package/assets-meta.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const assetsMeta = {
2
2
  "themes": {
3
- "default": "sap_fiori_3",
3
+ "default": "sap_horizon",
4
4
  "all": [
5
5
  "sap_fiori_3",
6
6
  "sap_fiori_3_dark",
@@ -9,12 +9,15 @@ const assetsMeta = {
9
9
  "sap_belize_hcw",
10
10
  "sap_fiori_3_hcb",
11
11
  "sap_fiori_3_hcw",
12
- "sap_horizon",
13
- "sap_horizon_dark",
14
- "sap_horizon_hcb",
15
- "sap_horizon_hcw",
16
- "sap_horizon_exp"
17
- ]
12
+ "sap_horizon",
13
+ "sap_horizon_dark",
14
+ "sap_horizon_hcb",
15
+ "sap_horizon_hcw",
16
+ "sap_horizon_exp",
17
+ "sap_horizon_dark_exp",
18
+ "sap_horizon_hcb_exp",
19
+ "sap_horizon_hcw_exp",
20
+ ],
18
21
  },
19
22
  "languages": {
20
23
  "default": "en",
@@ -22,6 +25,7 @@ const assetsMeta = {
22
25
  "ar",
23
26
  "bg",
24
27
  "ca",
28
+ "cnr",
25
29
  "cs",
26
30
  "cy",
27
31
  "da",
@@ -49,6 +53,7 @@ const assetsMeta = {
49
53
  "ko",
50
54
  "lt",
51
55
  "lv",
56
+ "mk",
52
57
  "ms",
53
58
  "nl",
54
59
  "no",
@@ -60,6 +65,7 @@ const assetsMeta = {
60
65
  "sh",
61
66
  "sk",
62
67
  "sl",
68
+ "sr",
63
69
  "sv",
64
70
  "th",
65
71
  "tr",
@@ -77,6 +83,7 @@ const assetsMeta = {
77
83
  "ar_SA",
78
84
  "bg",
79
85
  "ca",
86
+ // "cnr_ME" - cldr for not available yet
80
87
  "cs",
81
88
  "da",
82
89
  "de",
@@ -124,6 +131,7 @@ const assetsMeta = {
124
131
  "lt",
125
132
  "lv",
126
133
  "ms",
134
+ // "mk_MK" cldr not available yet
127
135
  "nb",
128
136
  "nl",
129
137
  "nl_BE",
@@ -136,6 +144,7 @@ const assetsMeta = {
136
144
  "sk",
137
145
  "sl",
138
146
  "sr",
147
+ // "sr_Cyrl_RS" - cldr not available yet
139
148
  "sr_Latn",
140
149
  "sv",
141
150
  "th",
@@ -15,6 +15,7 @@ const overrides = tsMode ? [{
15
15
  ],
16
16
  parserOptions: {
17
17
  "project": ["./tsconfig.json", "./packages/*/tsconfig.json"],
18
+ EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
18
19
  },
19
20
  rules: {
20
21
  "no-shadow": "off",
@@ -27,6 +28,7 @@ const overrides = tsMode ? [{
27
28
  "@typescript-eslint/no-unsafe-call": "off",
28
29
  "@typescript-eslint/no-non-null-assertion": "off",
29
30
  "@typescript-eslint/no-empty-function": "off",
31
+ "@typescript-eslint/no-empty-interface": "off",
30
32
  "lines-between-class-members": "off",
31
33
  }
32
34
  }] : [];
@@ -8,17 +8,20 @@ const getScripts = (options) => {
8
8
 
9
9
  // The script creates all JS modules (dist/illustrations/{illustrationName}.js) out of the existing SVGs
10
10
  const illustrationsData = options.illustrationsData || [];
11
- const illustrations = illustrationsData.map(illustration => `node "${LIB}/create-illustrations/index.js" ${illustration.path} ${illustration.defaultText} ${illustration.illustrationsPrefix} ${illustration.set} ${illustration.destinationPath}`);
11
+ const illustrations = illustrationsData.map(illustration => `node "${LIB}/create-illustrations/index.js" ${illustration.path} ${illustration.defaultText} ${illustration.illustrationsPrefix} ${illustration.set} ${illustration.destinationPath} ${illustration.collection}`);
12
12
  const createIllustrationsJSImportsScript = illustrations.join(" && ");
13
13
 
14
- // The script creates the "dist/generated/js-imports/Illustration.js" file that registers loaders (dynamic JS imports) for each illustration
15
- const illustrationDestinationPaths = illustrationsData.map(illustrations => illustrations.destinationPath);
16
- const createIllustrationsLoadersScript = options.fioriPackage ? `node ${LIB}/generate-js-imports/illustrations.js ${illustrationDestinationPaths[0]} ${illustrationDestinationPaths[1]} dist/generated/js-imports` : "";
14
+ // The script creates the "src/generated/js-imports/Illustration.js" file that registers loaders (dynamic JS imports) for each illustration
15
+ const createIllustrationsLoadersScript = illustrationsData.map(illustrations => `node ${LIB}/generate-js-imports/illustrations.js ${illustrations.destinationPath} ${illustrations.dynamicImports.outputFile} ${illustrations.set} ${illustrations.collection} ${illustrations.dynamicImports.location} ${illustrations.dynamicImports.filterOut.join(" ")}`).join(" && ");
16
+
17
17
  const tsOption = options.typescript;
18
- const tsCommand = tsOption ? "tsc" : "";
19
- const tsWatchCommand = tsOption ? "tsc --watch" : "";
18
+ const tsCommandOld = tsOption ? "tsc" : "";
19
+ let tsWatchCommandStandalone = tsOption ? "tsc --watch" : "";
20
+ // this command is only used for standalone projects. monorepo projects get their watch from vite, so opt-out here
21
+ if (options.noWatchTS) {
22
+ tsWatchCommandStandalone = "";
23
+ }
20
24
  const tsCrossEnv = tsOption ? "cross-env UI5_TS=true" : "";
21
- const copySrcGenerated = tsOption ? "" : "copy.srcGenerated";
22
25
 
23
26
  if (tsOption) {
24
27
  try {
@@ -54,19 +57,24 @@ const getScripts = (options) => {
54
57
  clean: 'rimraf jsdoc-dist && rimraf src/generated && rimraf dist && rimraf .port && nps "scope.testPages.clean"',
55
58
  lint: `eslint . ${eslintConfig}`,
56
59
  lintfix: `eslint . ${eslintConfig} --fix`,
57
- prepare: {
58
- default: `${tsCrossEnv} nps clean prepare.all typescript generateAPI`,
60
+ generate: {
61
+ default: `${tsCrossEnv} nps prepare.all`,
59
62
  all: 'concurrently "nps build.templates" "nps build.i18n" "nps prepare.styleRelated" "nps copy" "nps build.illustrations"',
60
63
  styleRelated: "nps build.styles build.jsonImports build.jsImports",
61
64
  },
62
- typescript: tsCommand,
65
+ prepare: {
66
+ default: `${tsCrossEnv} nps clean prepare.all copy prepare.typescript generateAPI`,
67
+ all: 'concurrently "nps build.templates" "nps build.i18n" "nps prepare.styleRelated" "nps build.illustrations"',
68
+ styleRelated: "nps build.styles build.jsonImports build.jsImports",
69
+ typescript: tsCommandOld,
70
+ },
63
71
  build: {
64
- default: "nps prepare lint build.bundle",
65
- templates: `mkdirp dist/generated/templates && ${tsCrossEnv} node "${LIB}/hbs2ui5/index.js" -d src/ -o src/generated/templates`,
72
+ default: "nps prepare lint build.bundle", // build.bundle2
73
+ templates: `mkdirp src/generated/templates && ${tsCrossEnv} node "${LIB}/hbs2ui5/index.js" -d src/ -o src/generated/templates`,
66
74
  styles: {
67
- default: `nps build.styles.themes build.styles.components ${copySrcGenerated}`,
68
- themes: `node "${LIB}/postcss-p/postcss-p.mjs"`,
69
- components: "postcss src/themes/*.css --config config/postcss.components --base src --dir dist/css/", // When updating this, also update the new files script
75
+ default: `concurrently "nps build.styles.themes" "nps build.styles.components"`,
76
+ themes: `node "${LIB}/css-processors/css-processor-themes.mjs"`,
77
+ components: `node "${LIB}/css-processors/css-processor-components.mjs"`,
70
78
  },
71
79
  i18n: {
72
80
  default: "nps build.i18n.defaultsjs build.i18n.json",
@@ -74,38 +82,35 @@ const getScripts = (options) => {
74
82
  json: `node "${LIB}/i18n/toJSON.js" src/i18n dist/generated/assets/i18n`,
75
83
  },
76
84
  jsonImports: {
77
- default: "mkdirp dist/generated/json-imports && nps build.jsonImports.themes build.jsonImports.i18n",
78
- themes: `node "${LIB}/generate-json-imports/themes.js" dist/generated/assets/themes dist/generated/json-imports`,
79
- i18n: `node "${LIB}/generate-json-imports/i18n.js" dist/generated/assets/i18n dist/generated/json-imports`,
85
+ default: "mkdirp src/generated/json-imports && nps build.jsonImports.themes build.jsonImports.i18n",
86
+ themes: `node "${LIB}/generate-json-imports/themes.js" dist/generated/assets/themes src/generated/json-imports`,
87
+ i18n: `node "${LIB}/generate-json-imports/i18n.js" dist/generated/assets/i18n src/generated/json-imports`,
80
88
  },
81
89
  jsImports: {
82
- default: "mkdirp dist/generated/js-imports && nps build.jsImports.illustrationsLoaders",
90
+ default: "mkdirp src/generated/js-imports && nps build.jsImports.illustrationsLoaders",
83
91
  illustrationsLoaders: createIllustrationsLoadersScript,
84
92
  },
85
93
  bundle: `vite build ${viteConfig}`,
94
+ bundle2: ``,
86
95
  illustrations: createIllustrationsJSImportsScript,
87
96
  },
88
97
  copy: {
89
98
  default: "nps copy.src copy.props",
90
- src: `node "${LIB}/copy-and-watch/index.js" --silent "src/**/*.js" dist/`,
91
- srcGenerated: `node "${LIB}/copy-and-watch/index.js" --silent "src/generated/**/*.js" dist/generated/`,
99
+ src: `node "${LIB}/copy-and-watch/index.js" --silent "src/**/*.{js,json}" dist/`,
100
+ // srcGenerated2: `node "${LIB}/copy-and-watch/index.js" --silent "src/generated/**/*.{js,json}" dist/generated/`,
92
101
  props: `node "${LIB}/copy-and-watch/index.js" --silent "src/**/*.properties" dist/`,
93
102
  },
94
103
  watch: {
95
- default: `${tsCrossEnv} concurrently "nps watch.templates" "nps watch.api" "nps watch.src" "nps watch.typescript" "nps watch.styles" "nps watch.i18n" "nps watch.props"`,
104
+ default: `${tsCrossEnv} concurrently "nps watch.templates" "nps watch.typescript" "nps watch.api" "nps watch.src" "nps watch.styles" "nps watch.i18n" "nps watch.props"`,
96
105
  devServer: 'concurrently "nps watch.default" "nps watch.bundle"',
97
106
  src: 'nps "copy.src --watch --safe --skip-initial-copy"',
98
- typescript: tsWatchCommand,
107
+ typescript: tsWatchCommandStandalone,
99
108
  props: 'nps "copy.props --watch --safe --skip-initial-copy"',
100
109
  bundle: `node ${LIB}/dev-server/dev-server.js ${viteConfig}`,
101
110
  styles: {
102
111
  default: 'concurrently "nps watch.styles.themes" "nps watch.styles.components"',
103
112
  themes: 'nps "build.styles.themes -w"',
104
- components: {
105
- default: 'concurrently "nps watch.styles.components.existingFiles" "nps watch.styles.components.newFiles"',
106
- existingFiles: `nps "build.styles.components -w"`,
107
- newFiles: `node "${LIB}/postcss-new-files/index.js" --srcFiles="src/themes/*.css"`,
108
- },
113
+ components: `nps "build.styles.components -w"`,
109
114
  },
110
115
  templates: 'chokidar "src/**/*.hbs" -c "nps build.templates"',
111
116
  api: 'chokidar "test/**/*.sample.html" -c "nps generateAPI"',
@@ -117,7 +122,7 @@ const getScripts = (options) => {
117
122
  "test-suite-2": `node "${LIB}/test-runner/test-runner.js" --suite suite2`,
118
123
  startWithScope: "nps scope.prepare scope.watchWithBundle",
119
124
  scope: {
120
- prepare: "nps scope.lint prepare scope.testPages",
125
+ prepare: "nps scope.lint scope.testPages",
121
126
  lint: `node "${LIB}/scoping/lint-src.js"`,
122
127
  testPages: {
123
128
  default: "nps scope.testPages.clean scope.testPages.copy scope.testPages.replace",
@@ -130,7 +135,9 @@ const getScripts = (options) => {
130
135
  bundle: `node ${LIB}/dev-server/dev-server.js ${viteConfig}`,
131
136
  },
132
137
  generateAPI: {
133
- default: "nps generateAPI.prepare generateAPI.preprocess generateAPI.jsdoc generateAPI.cleanup generateAPI.prepareManifest",
138
+ default: `nps ${ tsOption ? "generateAPI.generateCEM generateAPI.validateCEM" : "generateAPI.prepare generateAPI.preprocess generateAPI.jsdoc generateAPI.cleanup generateAPI.prepareManifest"}`,
139
+ generateCEM: `cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs"`,
140
+ validateCEM: `node "${LIB}/cem/validate.js"`,
134
141
  prepare: `node "${LIB}/copy-and-watch/index.js" --silent "dist/**/*.js" jsdoc-dist/`,
135
142
  prepareManifest: `node "${LIB}/generate-custom-elements-manifest/index.js" dist dist`,
136
143
  preprocess: `node "${preprocessJSDocScript}" jsdoc-dist/ src`,
@@ -1,21 +1 @@
1
- const postcssImport = require('postcss-import');
2
- const postcssCSStoESM = require('../lib/postcss-css-to-esm/index.js');
3
- const cssnano = require('cssnano');
4
- const fs = require("fs");
5
-
6
- const packageName = JSON.parse(fs.readFileSync("./package.json")).name;
7
-
8
- module.exports = {
9
- plugins: [
10
- postcssImport(),
11
- cssnano({
12
- preset: [
13
- 'default', {
14
- mergeLonghand: false, // https://github.com/cssnano/cssnano/issues/675
15
- mergeRules: false, // https://github.com/cssnano/cssnano/issues/730
16
- },
17
- ]
18
- }),
19
- postcssCSStoESM({ toReplace: 'src', includeDefaultTheme: true, packageName }),
20
- ]
21
- }
1
+ module.exports = {}
@@ -1,36 +1 @@
1
- const postcssImport = require('postcss-import');
2
- const combineSelectors = require('../lib/postcss-combine-duplicated-selectors/index.js');
3
- const postcssCSStoJSON = require('../lib/postcss-css-to-json/index.js');
4
- const postcssCSStoESM = require('../lib/postcss-css-to-esm/index.js');
5
- const cssnano = require('cssnano');
6
- const modifySelectors = require("modify-selectors");
7
- const fs = require("fs");
8
-
9
- const packageName = JSON.parse(fs.readFileSync("./package.json")).name;
10
-
11
- module.exports = {
12
- plugins: [
13
- postcssImport(),
14
- combineSelectors({
15
- removeDuplicatedProperties: true
16
- }),
17
- cssnano({
18
- preset: [
19
- 'default', {
20
- mergeLonghand: false, // https://github.com/cssnano/cssnano/issues/675
21
- },
22
- ]
23
- },),
24
- modifySelectors({
25
- enable: true,
26
- suffix: [
27
- {
28
- match: '*',
29
- with: '[_ui5host]', // Add suffix to each selector in the file (:root => :root [_ui5host])
30
- },
31
- ],
32
- }),
33
- postcssCSStoJSON({ toReplace: 'src', packageName }),
34
- postcssCSStoESM({ toReplace: 'src', packageName }),
35
- ]
36
- };
1
+ module.exports = {};
@@ -9,8 +9,5 @@ export default defineConfig(async () => {
9
9
  emptyOutDir: false,
10
10
  },
11
11
  plugins: [data],
12
- server: {
13
- open: "/packages/main/test/pages/Button.html",
14
- }
15
12
  }
16
13
  })