@profitlich/template-toolkit 7.4.0 → 7.5.0
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/CLAUDE.project.md +23 -14
- package/README.md +2 -1
- package/eslint/config.js +53 -0
- package/package.json +29 -9
- package/scripts/deploy.js +2 -0
- package/vite/config.js +130 -0
- package/vite/postcssPlugins.js +19 -0
package/CLAUDE.project.md
CHANGED
|
@@ -71,8 +71,8 @@ Debug-Code bleibt im Quelltext — man braucht ihn beim nächsten Mal wieder. Er
|
|
|
71
71
|
|
|
72
72
|
Dafür zwei Hebel, je nach Fall:
|
|
73
73
|
|
|
74
|
-
- **`console.*`** — entfernt Terser beim Produktions-Build
|
|
75
|
-
- **Alles andere** (Debug-Ausgaben ins DOM, Messungen, Overlays) — in `if (__DEBUG__) { … }` einschliessen. Vite ersetzt die Konstante zur Bauzeit
|
|
74
|
+
- **`console.*`** — entfernt Terser beim Produktions-Build (`drop_console: mode === 'production'` im Baustein `buildOptions`). Kein Zutun nötig.
|
|
75
|
+
- **Alles andere** (Debug-Ausgaben ins DOM, Messungen, Overlays) — in `if (__DEBUG__) { … }` einschliessen. Vite ersetzt die Konstante zur Bauzeit (Baustein `defineDebug`: `__DEBUG__: mode !== 'production'`); daraus wird `if (false)`, und der Minifier wirft den Zweig weg.
|
|
76
76
|
|
|
77
77
|
An `mode` hängen, **nicht** an `import.meta.env.DEV` — Letzteres ist auf Staging bereits `false` und würde den Debug-Code dort verschlucken.
|
|
78
78
|
|
|
@@ -93,7 +93,23 @@ Der Wert steht danach als `body[data-dev-navigate-space="true"]` bereit — für
|
|
|
93
93
|
|
|
94
94
|
Der Schalter ersetzt nicht `__DEBUG__`, er ergänzt es: `__DEBUG__` entscheidet, ob der Code überhaupt ausgeliefert wird, der Schalter, ob man ihn gerade sehen will.
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
`eslintConfig()` aus `@profitlich/template-toolkit/eslint/config` kennt `__DEBUG__` bereits; eine eigene ESLint-Konfiguration braucht dafür einen Eintrag unter `languageOptions.globals`, sonst meldet `no-undef`.
|
|
97
|
+
|
|
98
|
+
### Build-Konfiguration
|
|
99
|
+
|
|
100
|
+
`vite.config.js`, `postcss.config.js` und `eslint.config.js` setzen sich aus **Bausteinen des Toolkits** und den Angaben des Projekts zusammen. Generisches – Minifizierung, Debug-Konstante, Dev-Server, SCSS-Einrichtung, PostCSS-Plugins, Lint-Regeln – kommt aus dem Toolkit und wird mit ihm aktualisiert. Im Projekt stehen nur Entries, Plugins, Pfade und Ignore-Listen.
|
|
101
|
+
|
|
102
|
+
```js
|
|
103
|
+
// vite.config.js (Auszug)
|
|
104
|
+
import { defineDebug, buildOptions, serverOptions, scssOptions } from '@profitlich/template-toolkit/vite/config';
|
|
105
|
+
|
|
106
|
+
define: defineDebug(mode),
|
|
107
|
+
build: { ...buildOptions({ mode, outDir: './web/dist/' }), rollupOptions: { input: { app: 'src/App.js' } } },
|
|
108
|
+
server: serverOptions({ env }),
|
|
109
|
+
css: { preprocessorOptions: { scss: await scssOptions({ configJson }) } },
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Einen generischen Wert nicht im Projekt umbauen, sondern im Toolkit ändern – sonst läuft das Projekt wieder auseinander. Weicht ein Projekt bewusst ab, den Wert direkt neben dem Baustein überschreiben und begründen.
|
|
97
113
|
|
|
98
114
|
### SCSS
|
|
99
115
|
|
|
@@ -108,13 +124,13 @@ Ist ESLint eingerichtet, braucht `__DEBUG__` einen Eintrag unter `languageOption
|
|
|
108
124
|
|
|
109
125
|
Gleich *geschriebene* `$layout`-Aufrufe wie `font($layout, 14, 20)` sind keine Wiederholung – sie ergeben pro Breakpoint andere Werte und bleiben in den Blöcken.
|
|
110
126
|
|
|
111
|
-
Das PostCSS-Plugin `@profitlich/template-toolkit/vite/postcssBreakpointDry` meldet beim Build und im Dev-Server, wo es trotzdem passiert ist: Deklarationen, die mit gleichem Selektor und Wert in Media-Queries stehen, die zusammen alle Breiten abdecken, und solche, die nur die Grundregel wiederholen. Es warnt nur. Eingebunden in `postcss.config.js`:
|
|
127
|
+
Das PostCSS-Plugin `@profitlich/template-toolkit/vite/postcssBreakpointDry` meldet beim Build und im Dev-Server, wo es trotzdem passiert ist: Deklarationen, die mit gleichem Selektor und Wert in Media-Queries stehen, die zusammen alle Breiten abdecken, und solche, die nur die Grundregel wiederholen. Es warnt nur. Eingebunden ist es über die Toolkit-Plugins in `postcss.config.js`:
|
|
112
128
|
|
|
113
129
|
```js
|
|
114
|
-
import
|
|
130
|
+
import { postcssPlugins } from '@profitlich/template-toolkit/vite/postcssPlugins';
|
|
115
131
|
|
|
116
132
|
export default {
|
|
117
|
-
plugins: [
|
|
133
|
+
plugins: [...postcssPlugins()],
|
|
118
134
|
};
|
|
119
135
|
```
|
|
120
136
|
|
|
@@ -132,14 +148,7 @@ Setup im Konsumenten:
|
|
|
132
148
|
|
|
133
149
|
1. `@capsizecss/unpack` und `@capsizecss/core` als devDependency installieren.
|
|
134
150
|
2. In `src/config.json` Top-Level-Feld `fonts` ergänzen: Map Name → Pfad zur Font-Datei.
|
|
135
|
-
3.
|
|
136
|
-
|
|
137
|
-
```js
|
|
138
|
-
import { createCapsizeFunctions } from '@profitlich/template-toolkit/vite/capsizeSassFunctions';
|
|
139
|
-
// defineConfig async:
|
|
140
|
-
const capsizeFunctions = await createCapsizeFunctions(configJson.fonts ?? {});
|
|
141
|
-
// dann: css.preprocessorOptions.scss.functions = capsizeFunctions;
|
|
142
|
-
```
|
|
151
|
+
3. Nichts weiter: Der Baustein `scssOptions` lädt die Capsize-Funktionen, sobald `fonts` Einträge hat.
|
|
143
152
|
|
|
144
153
|
4. Pro `@include font(...)` als 4. Argument den Font-Namen aus `fonts` mitgeben — Trims werden emittiert. Ohne Argument: kein Capsize-Output (Default).
|
|
145
154
|
|
package/README.md
CHANGED
|
@@ -12,7 +12,8 @@ Wie Toolkit, Vorlagen und Projekte zusammenhängen und was auf welche Ebene geh
|
|
|
12
12
|
| Utilities | `…/utils/<Name>` | `MediaQueries`, `VwBody`, `BodyScrolled`, `ImagesLoaded`, `MailAdresses` |
|
|
13
13
|
| Komponenten | `…/components/…` | `MenuToggle`, `MuxPlayer` |
|
|
14
14
|
| Dev-Toolbar | `…/dev` | `initDev(config, { toggles })`, Raster-Overlay |
|
|
15
|
-
| Vite/PostCSS | `…/vite/<Name>` | `
|
|
15
|
+
| Vite/PostCSS | `…/vite/<Name>` | Bausteine für `vite.config.js` (`…/vite/config`: `defineDebug`, `buildOptions`, `serverOptions`, `scssOptions`), `postcssPlugins`, `postcssBreakpointDry`, `jsonToScss`, `capsizeSassFunctions` |
|
|
16
|
+
| ESLint | `…/eslint/config` | `eslintConfig()` – Grundkonfiguration, das Projekt stellt seine `ignores` voran |
|
|
16
17
|
| Skripte | `…/scripts/<Name>` | `copy-files`, `deploy`, `pagespeed` |
|
|
17
18
|
|
|
18
19
|
Die vollständige Liste steht unter `exports` in der `package.json`. Was jede Funktion tut, steht in ihrem JSDoc.
|
package/eslint/config.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import globals from 'globals';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Die ESLint-Grundkonfiguration aller Toolkit-Projekte (Flat Config).
|
|
6
|
+
*
|
|
7
|
+
* Das Projekt stellt seine eigene `ignores`-Liste voran – welche Ordner
|
|
8
|
+
* erzeugt oder fremd sind, unterscheidet sich je CMS – und kann weitere
|
|
9
|
+
* Blöcke anhängen:
|
|
10
|
+
*
|
|
11
|
+
* ```js
|
|
12
|
+
* import { eslintConfig } from '@profitlich/template-toolkit/eslint/config';
|
|
13
|
+
* export default [{ ignores: ['templates/**', 'web/**'] }, ...eslintConfig()];
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @returns {import('eslint').Linter.Config[]}
|
|
17
|
+
*/
|
|
18
|
+
export function eslintConfig() {
|
|
19
|
+
return [
|
|
20
|
+
js.configs.recommended,
|
|
21
|
+
|
|
22
|
+
{
|
|
23
|
+
// Frontend: läuft im Browser
|
|
24
|
+
files: ['src/**/*.js'],
|
|
25
|
+
languageOptions: {
|
|
26
|
+
ecmaVersion: 'latest',
|
|
27
|
+
sourceType: 'module',
|
|
28
|
+
globals: {
|
|
29
|
+
...globals.browser,
|
|
30
|
+
// Von Vite per `define` zur Bauzeit ersetzt, siehe defineDebug in vite/config.js
|
|
31
|
+
__DEBUG__: 'readonly',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
rules: {
|
|
35
|
+
// Zugewiesene Werte, die niemand liest. Ungenutzte Funktionsargumente
|
|
36
|
+
// bleiben erlaubt, solange danach noch benutzte folgen – Event-Handler
|
|
37
|
+
// mit (event, index) sind sonst nicht schreibbar.
|
|
38
|
+
'no-unused-vars': ['error', { args: 'after-used' }],
|
|
39
|
+
'no-unused-private-class-members': 'error',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
{
|
|
44
|
+
// Build- und Deploy-Skripte: laufen in Node
|
|
45
|
+
files: ['scripts/**/*.js', '*.config.js'],
|
|
46
|
+
languageOptions: {
|
|
47
|
+
ecmaVersion: 'latest',
|
|
48
|
+
sourceType: 'module',
|
|
49
|
+
globals: globals.node,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@profitlich/template-toolkit",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.0",
|
|
4
4
|
"description": "Shared SCSS layout system, JS utilities, components and build scripts for profitlich template repos",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sass": "scss/forward.scss",
|
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
"./scripts/pagespeed": "./scripts/pagespeed.js",
|
|
27
27
|
"./vite/jsonToScss": "./vite/jsonToScss.js",
|
|
28
28
|
"./vite/capsizeSassFunctions": "./vite/capsizeSassFunctions.js",
|
|
29
|
-
"./vite/postcssBreakpointDry": "./vite/postcssBreakpointDry.js"
|
|
29
|
+
"./vite/postcssBreakpointDry": "./vite/postcssBreakpointDry.js",
|
|
30
|
+
"./vite/config": "./vite/config.js",
|
|
31
|
+
"./vite/postcssPlugins": "./vite/postcssPlugins.js",
|
|
32
|
+
"./eslint/config": "./eslint/config.js"
|
|
30
33
|
},
|
|
31
34
|
"files": [
|
|
32
35
|
"CLAUDE.project.md",
|
|
@@ -34,27 +37,44 @@
|
|
|
34
37
|
"CLAUDE.kirbycms.md",
|
|
35
38
|
"components/",
|
|
36
39
|
"dev/",
|
|
40
|
+
"eslint/",
|
|
37
41
|
"scss/",
|
|
38
42
|
"scripts/",
|
|
39
43
|
"utils/",
|
|
40
44
|
"vite/"
|
|
41
45
|
],
|
|
42
46
|
"dependencies": {
|
|
43
|
-
"basic-ftp": "^
|
|
44
|
-
"canvas-grid-lines": "^10.
|
|
45
|
-
"chokidar": "^
|
|
47
|
+
"basic-ftp": "^6.2.1",
|
|
48
|
+
"canvas-grid-lines": "^10.5.1",
|
|
49
|
+
"chokidar": "^5.0.0",
|
|
46
50
|
"cli-progress": "^3.12.0",
|
|
47
|
-
"dotenv": "^
|
|
48
|
-
"fs-extra": "^11.
|
|
49
|
-
"glob": "^
|
|
51
|
+
"dotenv": "^18.0.5",
|
|
52
|
+
"fs-extra": "^11.4.1",
|
|
53
|
+
"glob": "^13.0.6",
|
|
50
54
|
"lil-gui": "^0.21.0"
|
|
51
55
|
},
|
|
52
56
|
"peerDependencies": {
|
|
53
57
|
"@capsizecss/core": ">=4.0.0",
|
|
54
58
|
"@capsizecss/unpack": ">=4.0.0",
|
|
55
|
-
"@mux/mux-player": ">=3.0.0"
|
|
59
|
+
"@mux/mux-player": ">=3.0.0",
|
|
60
|
+
"@eslint/js": ">=9.0.0",
|
|
61
|
+
"globals": ">=15.0.0",
|
|
62
|
+
"postcss-input-range": ">=6.0.0",
|
|
63
|
+
"sass": ">=1.79.0"
|
|
56
64
|
},
|
|
57
65
|
"peerDependenciesMeta": {
|
|
66
|
+
"@eslint/js": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"globals": {
|
|
70
|
+
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"postcss-input-range": {
|
|
73
|
+
"optional": true
|
|
74
|
+
},
|
|
75
|
+
"sass": {
|
|
76
|
+
"optional": true
|
|
77
|
+
},
|
|
58
78
|
"@capsizecss/core": {
|
|
59
79
|
"optional": true
|
|
60
80
|
},
|
package/scripts/deploy.js
CHANGED
|
@@ -212,6 +212,8 @@ export async function runDeploy(mode, uploadTasks, options = {}) {
|
|
|
212
212
|
activeProgressBar.stop();
|
|
213
213
|
}
|
|
214
214
|
console.error('Deployment failed:', err);
|
|
215
|
+
// exitCode statt exit(), damit finally die Verbindung noch schliesst
|
|
216
|
+
process.exitCode = 1;
|
|
215
217
|
} finally {
|
|
216
218
|
mainClient.close();
|
|
217
219
|
}
|
package/vite/config.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { NodePackageImporter } from 'sass';
|
|
3
|
+
import { jsonToScss } from './jsonToScss.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Bausteine für die `vite.config.js` eines Projekts.
|
|
7
|
+
*
|
|
8
|
+
* Jeder Baustein liefert die Optionen eines Bereichs der Vite-Konfiguration
|
|
9
|
+
* (`define`, `build`, `server`, `css.preprocessorOptions.scss`). Das Projekt
|
|
10
|
+
* setzt sie zusammen und ergänzt, was nur es selbst kennt – Entries, Plugins,
|
|
11
|
+
* Pfade. Einzelne Werte überschreibt es direkt neben dem Baustein.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* `define`-Einträge für Debug-Code.
|
|
16
|
+
*
|
|
17
|
+
* `__DEBUG__` wird zur Bauzeit durch ein Literal ersetzt. Aus `if (__DEBUG__)`
|
|
18
|
+
* wird damit `if (false)`, und der Minifier entfernt den Zweig – Debug-Code
|
|
19
|
+
* bleibt im Quelltext, erreicht die Produktion aber nicht.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} mode - Vite-Mode (`development`, `staging`, `production`).
|
|
22
|
+
* @returns {Object} Für `define`.
|
|
23
|
+
*/
|
|
24
|
+
export function defineDebug(mode) {
|
|
25
|
+
// An `mode` gehängt, nicht an `import.meta.env.DEV`: Letzteres wäre auf
|
|
26
|
+
// Staging bereits false und würde den Debug-Code dort verschlucken.
|
|
27
|
+
return { __DEBUG__: mode !== 'production' };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @typedef {Object} BuildOptions
|
|
32
|
+
* @property {string} mode - Vite-Mode.
|
|
33
|
+
* @property {string} outDir - Zielordner des Builds, z.B. `./web/dist/` (Craft) oder `public/dist` (Kirby).
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Optionen für `build`: Manifest, Minifizierung, Sourcemaps.
|
|
38
|
+
* Entries (`rollupOptions.input`) ergänzt das Projekt.
|
|
39
|
+
*
|
|
40
|
+
* @param {BuildOptions} options
|
|
41
|
+
* @returns {Object} Für `build`.
|
|
42
|
+
*/
|
|
43
|
+
export function buildOptions({ mode, outDir }) {
|
|
44
|
+
return {
|
|
45
|
+
manifest: true,
|
|
46
|
+
outDir,
|
|
47
|
+
sourcemap: mode === 'development',
|
|
48
|
+
emptyOutDir: true,
|
|
49
|
+
// modulepreload können alle aktuellen Browser, das Polyfill wäre nur zusätzlicher Code
|
|
50
|
+
modulePreload: { polyfill: false },
|
|
51
|
+
minify: 'terser',
|
|
52
|
+
// LightningCSS innerhalb der Vite-Pipeline, nicht als PostCSS-Plugin:
|
|
53
|
+
// Als Plugin lief es nach Vites CSS-Transform und ersetzte gehashte
|
|
54
|
+
// Asset-URLs wieder durch die ursprünglichen, relativen Pfade.
|
|
55
|
+
cssMinify: 'lightningcss',
|
|
56
|
+
terserOptions: {
|
|
57
|
+
// console.* nur in Production-Builds entfernen; auf Staging hilft es beim Prüfen
|
|
58
|
+
compress: { drop_console: mode === 'production' },
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @typedef {Object} ServerOptions
|
|
65
|
+
* @property {Object} env - Ergebnis von `loadEnv()`; gelesen wird `PRIMARY_SITE_URL`.
|
|
66
|
+
* @property {number} [port=5173] - Muss zu `.ddev/config.yaml` und der CMS-Vite-Konfiguration passen.
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Optionen für `server`: Vite-Dev-Server im ddev-Container.
|
|
71
|
+
*
|
|
72
|
+
* @param {ServerOptions} options
|
|
73
|
+
* @returns {Object} Für `server`.
|
|
74
|
+
*/
|
|
75
|
+
export function serverOptions({ env, port = 5173 }) {
|
|
76
|
+
return {
|
|
77
|
+
host: '0.0.0.0',
|
|
78
|
+
port,
|
|
79
|
+
strictPort: true,
|
|
80
|
+
origin: `${env.PRIMARY_SITE_URL.replace(/:\d+$/, '')}:${port}`,
|
|
81
|
+
cors: {
|
|
82
|
+
origin: /https?:\/\/([A-Za-z0-9\-.]+)?(\.ddev\.site)(?::\d+)?$/,
|
|
83
|
+
},
|
|
84
|
+
watch: {
|
|
85
|
+
ignored: ['**/node_modules/**', '**/vendor/**'],
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @typedef {Object} ScssOptions
|
|
92
|
+
* @property {Object} configJson - Inhalt von `src/config.json`; per `@use 'config'` als SCSS-Variablen verfügbar.
|
|
93
|
+
* @property {string[]} [loadPaths=['src/scss']] - Relativ zum Projektverzeichnis.
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Optionen für `css.preprocessorOptions.scss`: Paket-Importe, `config.json`
|
|
98
|
+
* als SCSS-Modul und – wenn `configJson.fonts` Schriften nennt – die
|
|
99
|
+
* Capsize-Funktionen.
|
|
100
|
+
*
|
|
101
|
+
* @param {ScssOptions} options
|
|
102
|
+
* @returns {Promise<Object>} Für `css.preprocessorOptions.scss`.
|
|
103
|
+
*/
|
|
104
|
+
export async function scssOptions({ configJson, loadPaths = ['src/scss'] }) {
|
|
105
|
+
const options = {
|
|
106
|
+
api: 'modern',
|
|
107
|
+
importers: [
|
|
108
|
+
new NodePackageImporter(),
|
|
109
|
+
{
|
|
110
|
+
canonicalize(url) {
|
|
111
|
+
return url === 'config' ? new URL('custom:config') : null;
|
|
112
|
+
},
|
|
113
|
+
load(canonicalUrl) {
|
|
114
|
+
if (canonicalUrl.toString() !== 'custom:config') return null;
|
|
115
|
+
return { contents: jsonToScss(configJson), syntax: 'scss' };
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
loadPaths: loadPaths.map((p) => path.resolve(process.cwd(), p)),
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
// Erst bei Bedarf laden: Capsize braucht die optionalen Pakete @capsizecss/*,
|
|
123
|
+
// die nur Projekte mit Schriftdateien installiert haben.
|
|
124
|
+
if (configJson.fonts && Object.keys(configJson.fonts).length > 0) {
|
|
125
|
+
const { createCapsizeFunctions } = await import('./capsizeSassFunctions.js');
|
|
126
|
+
options.functions = await createCapsizeFunctions(configJson.fonts);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return options;
|
|
130
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import postcssInputRange from 'postcss-input-range';
|
|
2
|
+
import postcssBreakpointDry from './postcssBreakpointDry.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Die PostCSS-Plugins aller Toolkit-Projekte, für `plugins` in
|
|
6
|
+
* `postcss.config.js`. Das Projekt kann weitere anhängen.
|
|
7
|
+
*
|
|
8
|
+
* - `postcss-input-range`: übersetzt `::range-thumb`/`::range-track` für
|
|
9
|
+
* Schieberegler in die browserspezifischen Pseudo-Elemente.
|
|
10
|
+
* - `postcssBreakpointDry`: warnt bei Wiederholungen über Breakpoints hinweg.
|
|
11
|
+
*
|
|
12
|
+
* Minifiziert wird nicht hier, sondern über `cssMinify` in den Build-Optionen
|
|
13
|
+
* (siehe `buildOptions` in `vite/config.js`).
|
|
14
|
+
*
|
|
15
|
+
* @returns {import('postcss').AcceptedPlugin[]}
|
|
16
|
+
*/
|
|
17
|
+
export function postcssPlugins() {
|
|
18
|
+
return [postcssInputRange(), postcssBreakpointDry()];
|
|
19
|
+
}
|