@massimo-cassandro/minimo 1.38.2 → 1.38.4
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.
- package/dev-tools/design-tokens-builder/build-tokens-src/light-dark.mjs +9 -2
- package/dev-tools/starter-kit/source_files/app/api/.gitkeep +0 -0
- package/dev-tools/starter-kit/source_files/app/src/components/.gitkeep +0 -0
- package/dev-tools/starter-kit/source_files/app/src/js/.gitkeep +0 -0
- package/dev-tools/starter-kit/source_files/app/src/pagine/.gitkeep +0 -0
- package/dev-tools/starter-kit/source_files/app/src/web-components/.gitkeep +0 -0
- package/dev-tools/starter-kit/source_files/root/webpack.config.mjs +11 -4
- package/dev-tools/starter-kit/webpack-config-upg.md +4 -0
- package/dev-tools/stylelint-config/index.js +2 -1
- package/package.json +1 -1
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
// and a `dark` mode, custom properties present in BOTH — matched by name —
|
|
5
5
|
// are written once, as `--name: light-dark(<light-value>, <dark-value>);`,
|
|
6
6
|
// instead of being split across the base mode's top-level `:root { ... }`
|
|
7
|
-
// block and a `@media (prefers-color-scheme: dark) { ... }` block.
|
|
7
|
+
// block and a `@media (prefers-color-scheme: dark) { ... }` block. If the two
|
|
8
|
+
// values are identical, light-dark() would be redundant: the bare value is
|
|
9
|
+
// written instead, e.g. `--name: <value>;`.
|
|
8
10
|
//
|
|
9
11
|
// Only `light` and `dark` are affected:
|
|
10
12
|
// - a third mode (e.g. a custom `high-contrast` key in sourceModes) is left
|
|
@@ -74,7 +76,12 @@ export const applyLightDarkFunc = ({ modeFinalProps, modeNames, baseMode, select
|
|
|
74
76
|
// Prefers the light-side trailing comment (e.g. a token $description);
|
|
75
77
|
// falls back to the dark-side one if light has none.
|
|
76
78
|
const comment = light.comment || dark.comment;
|
|
77
|
-
|
|
79
|
+
// Equal light/dark values: light-dark(x, x) would be redundant — use the
|
|
80
|
+
// bare value directly instead.
|
|
81
|
+
const value = light.value === dark.value
|
|
82
|
+
? light.value
|
|
83
|
+
: `light-dark(${light.value}, ${dark.value})`;
|
|
84
|
+
sharedProps[name] = `${value};${comment ? ` ${comment}` : ''}`;
|
|
78
85
|
}
|
|
79
86
|
|
|
80
87
|
const stripCommon = (props) => {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -138,7 +138,7 @@ const { CustomPropsPurgeCssPlugin } = runCustomPropsPlugin
|
|
|
138
138
|
// NB: PurgeCSS elabora ogni asset css singolarmente, quindi i @keyframes
|
|
139
139
|
// definiti nello `shared.css` ma usati solo in un altro asset (es. un css di
|
|
140
140
|
// progetto che usa una animation di minimo) verrebbero rimossi: in tal caso
|
|
141
|
-
// aggiungerli a
|
|
141
|
+
// aggiungerli a 'safelist.keyframes' o impostare `keyframes: false` in
|
|
142
142
|
// `purgeCSSOptions`
|
|
143
143
|
const shared_chunk_paths = (module) => {
|
|
144
144
|
|
|
@@ -146,7 +146,6 @@ const shared_chunk_paths = (module) => {
|
|
|
146
146
|
const sep = '[\\\\/]'; // stringa che produce [\\/] nel pattern
|
|
147
147
|
const pathsRegexp = new RegExp([
|
|
148
148
|
'node_modules',
|
|
149
|
-
'app/src',
|
|
150
149
|
'app/src/js',
|
|
151
150
|
'app/src/web-components',
|
|
152
151
|
'app/src/components',
|
|
@@ -411,8 +410,7 @@ const config = {
|
|
|
411
410
|
// fileName: path.join(output_dir, 'manifest.json'),
|
|
412
411
|
// sf: fileName: 'manifest.json', // scrive in output.path
|
|
413
412
|
// // basePath: item.source_dirname
|
|
414
|
-
// // removeKeyHash: /(
|
|
415
|
-
// removeKeyHash: true, // /([a-f0-9]{32}\.?)/gi, // /(\?as_asset)$/,
|
|
413
|
+
// // removeKeyHash: /\?.*$/, // /([a-f0-9]{32}\.?)/gi, // /(\?as_asset)$/,
|
|
416
414
|
// // rimuove i font dal manifest. Non necessari, rendono il file inutilmente grande
|
|
417
415
|
// filter: isDevelopment? undefined : (FileDescriptor) => {
|
|
418
416
|
// return /fonts/.test(FileDescriptor.path)? false : true;
|
|
@@ -427,6 +425,15 @@ const config = {
|
|
|
427
425
|
ignoreOrder: true
|
|
428
426
|
}),
|
|
429
427
|
|
|
428
|
+
// =>> plugins: MiniCssExtractPlugin
|
|
429
|
+
// contenthash solo se non si usa Dev Server
|
|
430
|
+
new MiniCssExtractPlugin({
|
|
431
|
+
filename: process.env.WEBPACK_SERVE ? '[name].css' : '[name].[contenthash].css',
|
|
432
|
+
chunkFilename: process.env.WEBPACK_SERVE ? '[id].css' : '[id].[contenthash].css',
|
|
433
|
+
ignoreOrder: true
|
|
434
|
+
}),
|
|
435
|
+
|
|
436
|
+
|
|
430
437
|
// =>> plugins: InlineCriticalCssPlugin (solo prod)
|
|
431
438
|
// ...(isDevelopment
|
|
432
439
|
// ? []
|
|
@@ -8,6 +8,10 @@ Le versioni precedenti sono conservate in `archived/webpack-config-v2/` del repo
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
+
## Fix da verificare sempre
|
|
12
|
+
* WebpackManifestPlugin: impostare `removeKeyHash: /\?.*$/, // /([a-f0-9]{32}\.?)/gi, // /(\?as_asset)$/,`, sostituendo eventuali impostazione `removeKeyHash: true` se presente
|
|
13
|
+
|
|
14
|
+
|
|
11
15
|
## Da v2 a v3
|
|
12
16
|
|
|
13
17
|
Novità della v3: le definizioni delle custom properties non sono più gestite da PurgeCSS (`variables`) né da postcss-jit-props, ma da un plugin webpack dedicato, `custom-props-purgecss-plugin.mjs`, che opera sugli asset CSS finali (dopo la minificazione) e inietta solo le custom properties effettivamente usate (dipendenze transitive incluse), partendo dal file master `app/css/custom-properties.css`. Il plugin è attivabile con un flag, indipendente da `usePurgeCss`.
|
|
@@ -77,6 +77,7 @@ export default {
|
|
|
77
77
|
'@stylistic/block-closing-brace-newline-after': null,
|
|
78
78
|
'@stylistic/block-opening-brace-space-before': null,
|
|
79
79
|
'@stylistic/declaration-block-semicolon-newline-before': 'never-multi-line',
|
|
80
|
+
'@stylistic/declaration-colon-newline-after': null,
|
|
80
81
|
'@stylistic/function-max-empty-lines': 2,
|
|
81
82
|
'@stylistic/function-parentheses-space-inside': 'never-single-line',
|
|
82
83
|
'@stylistic/max-empty-lines': 2,
|
|
@@ -93,7 +94,7 @@ export default {
|
|
|
93
94
|
'@stylistic/value-list-comma-newline-after': 'always-multi-line',
|
|
94
95
|
'@stylistic/value-list-comma-newline-before': 'never-multi-line',
|
|
95
96
|
'@stylistic/value-list-comma-space-after': null,
|
|
96
|
-
'@stylistic/value-list-max-empty-lines': 3
|
|
97
|
+
'@stylistic/value-list-max-empty-lines': 3,
|
|
97
98
|
},
|
|
98
99
|
overrides: [
|
|
99
100
|
{
|