@massimo-cassandro/minimo 1.32.4 → 1.33.1
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/README.md +2 -1
- package/dev-tools/starter-kit/source_files/_private/pwd.md +16 -0
- package/dev-tools/starter-kit/source_files/_private/sf.md +12 -0
- package/dev-tools/starter-kit/source_files/{CLAUDE-frontend.md → app/CLAUDE.md} +2 -1
- package/dev-tools/starter-kit/source_files/app/assets/api_htaccess +20 -0
- package/dev-tools/starter-kit/source_files/{layout-critical.css → app/css/layout.critical.css} +1 -1
- package/dev-tools/starter-kit/source_files/app/css/layout.css +0 -0
- package/dev-tools/starter-kit/source_files/app/index.js +1 -0
- package/dev-tools/starter-kit/{package-tpl.json → source_files/root/package-tpl.json} +1 -1
- package/dev-tools/starter-kit/source_files/{stylelint.config.mjs → root/stylelint.config.mjs} +1 -1
- package/dev-tools/starter-kit/source_files/root/webpack-config-modules/inline-critical-css.mjs +41 -0
- package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/purgecss-setup.mjs +1 -1
- package/dev-tools/starter-kit/{webpack.config.mjs → source_files/root/webpack.config.mjs} +56 -38
- package/dev-tools/starter-kit/starter-install.sh +233 -81
- package/dev-tools/stylelint-config/README.md +45 -0
- package/dev-tools/stylelint-config/index.js +184 -0
- package/dev-tools/stylelint-config/test/test.module.scss +9 -0
- package/package.json +11 -2
- package/snippets/php/iviewer.php +488 -0
- package/snippets/twig-symfony/ViewerController.php +549 -0
- package/src/custom-properties.css +36 -0
- package/src/minimo.css +3 -0
- package/src/utilities/dom-builder/dom-builder.js +9 -5
- package/src/web-components/json-table/json-table-component.js +632 -0
- package/src/web-components/json-table/json-table-component.module.css +247 -0
- package/src/web-components/json-table/json-table.minimo.tokens.mjs +243 -0
- package/src/web-components/json-table/readme.md +764 -0
- package/src/web-components/json-table/src/cell-content.js +136 -0
- package/src/web-components/json-table/src/content-utils.js +103 -0
- package/src/web-components/json-table/src/data-types.js +280 -0
- package/src/web-components/json-table/src/defaults.js +424 -0
- package/src/web-components/json-table/src/get-data.js +152 -0
- package/src/web-components/json-table/src/icons.js +80 -0
- package/src/web-components/json-table/src/info-section.js +107 -0
- package/src/web-components/json-table/src/main-builder.js +218 -0
- package/src/web-components/json-table/src/pagination.js +253 -0
- package/src/web-components/json-table/src/parse-cols.js +113 -0
- package/src/web-components/json-table/src/parse-rows.js +81 -0
- package/src/web-components/json-table/src/resolve-params.js +166 -0
- package/src/web-components/json-table/src/search.js +71 -0
- package/src/web-components/json-table/src/sorting.js +111 -0
- package/src/web-components/json-table/src/table-body.js +109 -0
- package/src/web-components/json-table/src/table-builder.js +152 -0
- package/src/web-components/json-table/src/table-tfoot.js +56 -0
- package/src/web-components/json-table/src/table-thead.js +183 -0
- package/src/web-components/json-table/src/update-info.js +67 -0
- package/src/web-components/s-datatable-component/{docs.md → readme.md} +67 -3
- package/src/web-components/s-datatable-component/s-datatable-component.js +1 -1
- package/types/global.d.ts +17 -3
- package/dev-tools/starter-kit/source_files/app_index.js +0 -1
- package/snippets/config-templates/_htaccess +0 -69
- package/snippets/config-templates/robots.txt +0 -5
- package/snippets/config-templates/rollup.config.mjs +0 -115
- /package/dev-tools/starter-kit/source_files/{_root_robots.txt → app/assets/robots.txt} +0 -0
- /package/dev-tools/starter-kit/source_files/{_root_htaccess → app/assets/root_htaccess} +0 -0
- /package/{src → dev-tools/starter-kit/source_files/app/css}/fonts.css +0 -0
- /package/dev-tools/starter-kit/source_files/{favicons-readme.md → app/favicons/favicons-readme.md} +0 -0
- /package/dev-tools/starter-kit/{webpack-template.ejs → source_files/app/tpl/index.ejs} +0 -0
- /package/dev-tools/starter-kit/source_files/{__project__.code-workspace → root/__project__.code-workspace} +0 -0
- /package/dev-tools/starter-kit/source_files/{_browserslistrc → root/_browserslistrc} +0 -0
- /package/dev-tools/starter-kit/source_files/{_editorconfig → root/_editorconfig} +0 -0
- /package/dev-tools/starter-kit/source_files/{_gitignore → root/_gitignore} +0 -0
- /package/dev-tools/starter-kit/source_files/{_prettierrc → root/_prettierrc} +0 -0
- /package/dev-tools/starter-kit/source_files/{eslint.config.mjs → root/eslint.config.mjs} +0 -0
- /package/dev-tools/starter-kit/source_files/{jsconfig.json → root/jsconfig.json} +0 -0
- /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/css-rules.mjs +0 -0
- /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/get-jsConfig-aliases.mjs +0 -0
- /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/mini-svg-data-uri-loader.cjs +0 -0
- /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/postcss.config.mjs +0 -0
- /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/purgecss-variables-safelist.mjs +0 -0
- /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/svg-rules.mjs +0 -0
- /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/svgo.config.mjs +0 -0
- /package/snippets/{config-templates/_github → _github}/dependabot.yml +0 -0
- /package/snippets/{error-pages/error-pages.js → error-pages.js} +0 -0
- /package/snippets/{config-templates/react → react}/offcanvas/offcanvas.jsx +0 -0
- /package/snippets/{config-templates/react → react}/offcanvas/offcanvas.module.scss +0 -0
- /package/snippets/{config-templates → root}/_hintrc.cjs +0 -0
- /package/snippets/{config-templates → root}/_npmignore +0 -0
- /package/snippets/{config-templates → root}/_npmrc +0 -0
- /package/snippets/{config-templates → root}/_stylelintignore +0 -0
- /package/snippets/{config-templates → root}/babel.config--react.json +0 -0
- /package/snippets/{config-templates → root}/babel.config--solidJS.json +0 -0
- /package/snippets/{ImgViewerController.php → twig-symfony/ImgViewerController.php} +0 -0
- /package/snippets/{UnsplashController.php → twig-symfony/UnsplashController.php} +0 -0
- /package/snippets/{config-templates → twig-symfony}/_env.local +0 -0
- /package/snippets/{error-pages → twig-symfony}/bundles/TwigBundle/Exception/error.html.twig +0 -0
- /package/snippets/{flash-messages.html.twig → twig-symfony/flash-messages.html.twig} +0 -0
- /package/snippets/{minimo-form-layout.html.twig → twig-symfony/minimo-form-layout.html.twig} +0 -0
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
# IMPORTANTE: questo script è idempotente e deve restare tale.
|
|
4
4
|
# Può essere rilanciato più volte sullo stesso progetto (anche via `npx starter-kit`
|
|
5
|
-
# per aggiornare un setup esistente) senza sovrascrivere nulla né creare duplicati
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
5
|
+
# per aggiornare un setup esistente) senza sovrascrivere nulla né creare duplicati.
|
|
6
|
+
# Per i singoli file installati sulla root del progetto e dentro
|
|
7
|
+
# ./webpack-config-modules: se il contenuto esistente è identico al sorgente la
|
|
8
|
+
# copia viene saltata; se è diverso e non esiste ancora un OLD- corrispondente,
|
|
9
|
+
# il file esistente viene rinominato con prefisso OLD- (preservato da quel
|
|
10
|
+
# momento in poi, non viene più toccato nelle esecuzioni successive) e il nuovo
|
|
11
|
+
# file prende il nome originale; se l'OLD- corrispondente esiste già, viene
|
|
12
|
+
# invece sovrascritto direttamente il file "nuovo", senza aggiungere ulteriori
|
|
13
|
+
# prefissi. Stessa logica, a livello di intera cartella (senza diff sui
|
|
14
|
+
# singoli file contenuti al suo interno prima della prima installazione), per
|
|
15
|
+
# ./webpack-config-modules.
|
|
16
|
+
# ./app segue invece una logica più semplice: viene rinominata per intero in
|
|
17
|
+
# OLD-app solo la prima volta che esiste già (preservata da quel momento in
|
|
18
|
+
# poi, mai più toccata); i file al suo interno vengono sempre sovrascritti
|
|
19
|
+
# senza controllo né backup individuale (force_cat), dato che l'intera
|
|
20
|
+
# cartella precedente resta comunque disponibile in OLD-app.
|
|
14
21
|
# Ogni modifica futura deve conservare questa proprietà.
|
|
15
22
|
|
|
16
23
|
RED='\033[0;31m'
|
|
@@ -27,6 +34,65 @@ if [ -z "$ZSH_VERSION" ]; then
|
|
|
27
34
|
exit 1
|
|
28
35
|
fi
|
|
29
36
|
|
|
37
|
+
# Porta da utilizzare: l'utente inserisce un numero da 0 a 99 (default 0), che
|
|
38
|
+
# viene normalizzato a due cifre e usato come suffisso delle porte 80xx e 57xx.
|
|
39
|
+
# I valori sostituiscono i segnaposto [[port8000]] e [[port5700]] presenti in
|
|
40
|
+
# package-tpl.json, webpack.config.mjs e altri (vedi safe_cat_with_ports).
|
|
41
|
+
read "PORT_INPUT?Porta da utilizzare (0-99) [0]: "
|
|
42
|
+
PORT_INPUT=${PORT_INPUT:-0}
|
|
43
|
+
if [[ ! "$PORT_INPUT" =~ '^[0-9]{1,2}$' ]]; then
|
|
44
|
+
printf "${RED}Errore: inserire un numero intero tra 0 e 99.${NC}\n" >&2
|
|
45
|
+
exit 1
|
|
46
|
+
fi
|
|
47
|
+
PORT_SUFFIX=${(l:2::0:)PORT_INPUT}
|
|
48
|
+
PORT_8000="80${PORT_SUFFIX}"
|
|
49
|
+
PORT_5700="57${PORT_SUFFIX}"
|
|
50
|
+
echo -e "${DIM}Porte: ${PORT_8000} (server), ${PORT_5700} (webpack dev server)${NC}"
|
|
51
|
+
|
|
52
|
+
# Pacchetti opzionali: installati come devDependency solo su conferma
|
|
53
|
+
# esplicita dell'utente (vedi ciclo di domande più sotto). Include sia
|
|
54
|
+
# devDependency "pure" del progetto, sia i peer dependencies opzionali di
|
|
55
|
+
# @massimo-cassandro/minimo (vedi package.json di minimo, campi
|
|
56
|
+
# peerDependencies/peerDependenciesMeta: elenco mantenuto a mano, non letto
|
|
57
|
+
# dinamicamente da minimo — se cambiano va aggiornato manualmente anche qui).
|
|
58
|
+
# In entrambi i casi vengono installati con `npm i -D`: in questo progetto
|
|
59
|
+
# `dependencies` contiene solo @massimo-cassandro/minimo, tutto il resto
|
|
60
|
+
# (tooling di build e librerie usate dai singoli componenti) è devDependency.
|
|
61
|
+
# Ogni voce è "<pacchetto>|<descrizione>" (pacchetto allineato a colonna fissa
|
|
62
|
+
# solo per leggibilità, non richiesto dal parsing).
|
|
63
|
+
optionalPackages=(
|
|
64
|
+
"dotenv-webpack | gestione variabili d'ambiente (.env) nel bundle webpack"
|
|
65
|
+
"@principalstudio/html-webpack-inject-preload | injection dei tag <link rel=preload> nell'html generato"
|
|
66
|
+
"postcss-jit-props | include nel CSS compilato solo le custom properties effettivamente usate"
|
|
67
|
+
"@svgdotjs/svg.js | richiesto da charts/ di minimo"
|
|
68
|
+
"blurhash | richiesto da unsplash-page di minimo (create-blurhash-canvas)"
|
|
69
|
+
"simple-datatables | richiesto da s-datatable-component di minimo"
|
|
70
|
+
"style-dictionary | richiesto da design-tokens/utilities di minimo (build-tokens)"
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
# Chiede conferma per un singolo pacchetto opzionale (default: No).
|
|
74
|
+
ask_optional_pkg() {
|
|
75
|
+
local pkg="$1"
|
|
76
|
+
local desc="$2"
|
|
77
|
+
local reply
|
|
78
|
+
read "reply?Installare il pacchetto opzionale '$pkg' (${desc})? [y/N]: "
|
|
79
|
+
[[ "$reply" =~ ^[Yy]$ ]]
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
selectedOptionalPkgs=()
|
|
83
|
+
|
|
84
|
+
if [ "$DEBUG" != "TRUE" ]; then
|
|
85
|
+
echo -e "\n${GREEN}...PACCHETTI OPZIONALI${NC}"
|
|
86
|
+
for entry in "${optionalPackages[@]}"; do
|
|
87
|
+
pkg="${entry%%|*}"
|
|
88
|
+
pkg="${pkg%% *}"
|
|
89
|
+
desc="${entry#*| }"
|
|
90
|
+
if ask_optional_pkg "$pkg" "$desc"; then
|
|
91
|
+
selectedOptionalPkgs+=("$pkg")
|
|
92
|
+
fi
|
|
93
|
+
done
|
|
94
|
+
fi
|
|
95
|
+
|
|
30
96
|
BASE_URL=${0:A:h}
|
|
31
97
|
|
|
32
98
|
echo "BASE_URL: ${BASE_URL}"
|
|
@@ -34,8 +100,6 @@ echo "BASE_URL: ${BASE_URL}"
|
|
|
34
100
|
SOURCE_FILES_DIR="${BASE_URL}/source_files"
|
|
35
101
|
|
|
36
102
|
# webpack
|
|
37
|
-
WEBPACK_CONFIG_SOURCE_PATH="$BASE_URL"
|
|
38
|
-
WEBPACK_MODULES_SOURCE_PATH="${BASE_URL}/webpack-config-modules"
|
|
39
103
|
WEBPACK_MODULES_INSTALL_PATH="./webpack-config-modules"
|
|
40
104
|
|
|
41
105
|
# protezione contro la sovrascrittura
|
|
@@ -67,11 +131,104 @@ safe_cat() {
|
|
|
67
131
|
cat "$src" >| "$dest"
|
|
68
132
|
}
|
|
69
133
|
|
|
134
|
+
# Come safe_cat, ma sostituisce i segnaposto [[port8000]] e [[port5700]] con
|
|
135
|
+
# le porte scelte all'avvio. La sostituzione viene fatta su un file temporaneo
|
|
136
|
+
# che è poi passato a safe_cat: il confronto per l'idempotenza avviene quindi
|
|
137
|
+
# sul contenuto già sostituito (stessa porta => copia saltata).
|
|
138
|
+
safe_cat_with_ports() {
|
|
139
|
+
local src="$1"
|
|
140
|
+
local dest="$2"
|
|
141
|
+
if [ ! -f "$src" ]; then
|
|
142
|
+
echo -e "${RED}Sorgente mancante: $src${NC}"
|
|
143
|
+
return 1
|
|
144
|
+
fi
|
|
145
|
+
local tmp="$(mktemp)"
|
|
146
|
+
sed -e "s/\[\[port8000\]\]/${PORT_8000}/g" \
|
|
147
|
+
-e "s/\[\[port5700\]\]/${PORT_5700}/g" \
|
|
148
|
+
"$src" >| "$tmp"
|
|
149
|
+
safe_cat "$tmp" "$dest"
|
|
150
|
+
local rc=$?
|
|
151
|
+
rm -f "$tmp"
|
|
152
|
+
return $rc
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
# A differenza di safe_cat, sovrascrive sempre senza confrontare né
|
|
156
|
+
# backuppare (nessun OLD- a livello di singolo file). Usata per i file
|
|
157
|
+
# installati dentro FRONTEND_INSTALL_PATH (./app), la cui idempotenza è già
|
|
158
|
+
# garantita a livello di intera cartella (OLD-app, vedi più sotto): non ha
|
|
159
|
+
# senso ripetere il controllo su ogni singolo file al suo interno.
|
|
160
|
+
force_cat() {
|
|
161
|
+
local src="$1"
|
|
162
|
+
local dest="$2"
|
|
163
|
+
if [ ! -f "$src" ]; then
|
|
164
|
+
echo -e "${RED}Sorgente mancante: $src${NC}"
|
|
165
|
+
return 1
|
|
166
|
+
fi
|
|
167
|
+
cat "$src" >| "$dest"
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
# Copia ricorsivamente tutti i file di una struttura sorgente (source_files/root
|
|
171
|
+
# o source_files/app) in una destinazione, preservando la struttura delle
|
|
172
|
+
# sotto-cartelle così com'è in source_files: aggiungere, spostare o rinominare
|
|
173
|
+
# file lì non richiede modifiche a questo script.
|
|
174
|
+
# Il terzo argomento (opzionale) è il nome di una funzione di rename invocata
|
|
175
|
+
# su ogni singolo basename, per i casi in cui il nome del file sorgente non
|
|
176
|
+
# coincide con quello di destinazione (vedi rename_root_file).
|
|
177
|
+
# Il quarto argomento (opzionale, default: safe_cat_with_ports) è la funzione
|
|
178
|
+
# di copia da usare per ogni file: safe_cat_with_ports confronta e backuppa
|
|
179
|
+
# il singolo file (sostituzione porte no-op se non contiene placeholder);
|
|
180
|
+
# force_cat sovrascrive sempre senza controlli (vedi sopra, usata per ./app).
|
|
181
|
+
install_tree() {
|
|
182
|
+
local src_root="$1"
|
|
183
|
+
local dest_root="$2"
|
|
184
|
+
local rename_fn="$3"
|
|
185
|
+
local copy_fn="${4:-safe_cat_with_ports}"
|
|
186
|
+
local file rel dir base new_base dest
|
|
187
|
+
while IFS= read -r file; do
|
|
188
|
+
rel="${file#"$src_root"/}"
|
|
189
|
+
dir="$(dirname "$rel")"
|
|
190
|
+
base="$(basename "$rel")"
|
|
191
|
+
if [ -n "$rename_fn" ]; then
|
|
192
|
+
new_base="$("$rename_fn" "$base")"
|
|
193
|
+
else
|
|
194
|
+
new_base="$base"
|
|
195
|
+
fi
|
|
196
|
+
if [ "$dir" = "." ]; then
|
|
197
|
+
dest="${dest_root}/${new_base}"
|
|
198
|
+
else
|
|
199
|
+
mkdir -p "${dest_root}/${dir}"
|
|
200
|
+
dest="${dest_root}/${dir}/${new_base}"
|
|
201
|
+
fi
|
|
202
|
+
"$copy_fn" "$file" "$dest"
|
|
203
|
+
done < <(find "$src_root" -type f)
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
# Rename applicato ai file di source_files/root/ in fase di copia:
|
|
207
|
+
# - prefisso singolo underscore -> dotfile (es. _gitignore -> .gitignore);
|
|
208
|
+
# il doppio underscore (__project__.code-workspace) non viene toccato,
|
|
209
|
+
# il nome resta invariato
|
|
210
|
+
# - suffisso -tpl prima dell'estensione -> rimosso (es. package-tpl.json ->
|
|
211
|
+
# package.json), usato per i file template che altrimenti confliggerebbero
|
|
212
|
+
# con l'omonimo file dello starter-kit stesso
|
|
213
|
+
rename_root_file() {
|
|
214
|
+
local name="$1"
|
|
215
|
+
if [[ "$name" == _* && "$name" != __* ]]; then
|
|
216
|
+
echo ".${name#_}"
|
|
217
|
+
return
|
|
218
|
+
fi
|
|
219
|
+
if [[ "$name" == *-tpl.* ]]; then
|
|
220
|
+
echo "${name/-tpl./.}"
|
|
221
|
+
return
|
|
222
|
+
fi
|
|
223
|
+
echo "$name"
|
|
224
|
+
}
|
|
225
|
+
|
|
70
226
|
FRONTEND_INSTALL_PATH="./app"
|
|
71
227
|
# se la cartella esiste già: la prima volta viene rinominata per intero in
|
|
72
228
|
# OLD-app (preservata, mai più toccata); se OLD-app esiste già, la cartella
|
|
73
|
-
# esistente non viene rinominata
|
|
74
|
-
#
|
|
229
|
+
# esistente non viene rinominata. In entrambi i casi i file al suo interno
|
|
230
|
+
# vengono poi sempre sovrascritti senza controlli individuali (force_cat):
|
|
231
|
+
# l'idempotenza è garantita a livello di intera cartella, non di singolo file.
|
|
75
232
|
if [ -d "$FRONTEND_INSTALL_PATH" ]; then
|
|
76
233
|
OLD_FRONTEND_INSTALL_PATH="$(dirname "$FRONTEND_INSTALL_PATH")/OLD-$(basename "$FRONTEND_INSTALL_PATH")"
|
|
77
234
|
if [ ! -e "$OLD_FRONTEND_INSTALL_PATH" ]; then
|
|
@@ -80,50 +237,6 @@ if [ -d "$FRONTEND_INSTALL_PATH" ]; then
|
|
|
80
237
|
fi
|
|
81
238
|
|
|
82
239
|
echo -e "${GREEN}Files will be installed in: '${FRONTEND_INSTALL_PATH}'${NC}"
|
|
83
|
-
mkdir -p "${FRONTEND_INSTALL_PATH}"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
echo -e "${GREEN}...ROOT FILES${NC}"
|
|
88
|
-
safe_cat "${BASE_URL}/package-tpl.json" package.json
|
|
89
|
-
safe_cat "${WEBPACK_CONFIG_SOURCE_PATH}/webpack.config.mjs" webpack.config.mjs
|
|
90
|
-
|
|
91
|
-
safe_cat "${SOURCE_FILES_DIR}/_gitignore" .gitignore
|
|
92
|
-
safe_cat "${SOURCE_FILES_DIR}/_browserslistrc" .browserslistrc
|
|
93
|
-
safe_cat "${SOURCE_FILES_DIR}/_editorconfig" .editorconfig
|
|
94
|
-
safe_cat "${SOURCE_FILES_DIR}/_prettierrc" .prettierrc
|
|
95
|
-
safe_cat "${SOURCE_FILES_DIR}/jsconfig.json" jsconfig.json
|
|
96
|
-
safe_cat "${SOURCE_FILES_DIR}/__project__.code-workspace" __project__.code-workspace
|
|
97
|
-
safe_cat "${SOURCE_FILES_DIR}/eslint.config.mjs" eslint.config.mjs
|
|
98
|
-
safe_cat "${SOURCE_FILES_DIR}/stylelint.config.mjs" stylelint.config.mjs
|
|
99
|
-
|
|
100
|
-
echo -e "${GREEN}...APP FILES${NC}"
|
|
101
|
-
safe_cat "${SOURCE_FILES_DIR}/_root_htaccess" "${FRONTEND_INSTALL_PATH}/_root_htaccess"
|
|
102
|
-
safe_cat "${SOURCE_FILES_DIR}/_root_robots.txt" "${FRONTEND_INSTALL_PATH}/_root_robots.txt"
|
|
103
|
-
safe_cat "${SOURCE_FILES_DIR}/CLAUDE-frontend.md" "${FRONTEND_INSTALL_PATH}/CLAUDE.md"
|
|
104
|
-
safe_cat "${WEBPACK_CONFIG_SOURCE_PATH}/webpack-template.ejs" "${FRONTEND_INSTALL_PATH}/tpl/index.ejs"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
echo -e "${GREEN}..WEBPACK CONFIG MODULES${NC}"
|
|
108
|
-
# se la cartella esiste già: la prima volta viene rinominata per intero in
|
|
109
|
-
# OLD-webpack-config-modules (preservata, mai più toccata); se l'OLD-
|
|
110
|
-
# corrispondente esiste già, la cartella esistente non viene rinominata e i
|
|
111
|
-
# file al suo interno vengono gestiti singolarmente dalla stessa logica di
|
|
112
|
-
# safe_cat.
|
|
113
|
-
if [ -d "$WEBPACK_MODULES_INSTALL_PATH" ]; then
|
|
114
|
-
OLD_WEBPACK_MODULES_INSTALL_PATH="$(dirname "$WEBPACK_MODULES_INSTALL_PATH")/OLD-$(basename "$WEBPACK_MODULES_INSTALL_PATH")"
|
|
115
|
-
if [ ! -e "$OLD_WEBPACK_MODULES_INSTALL_PATH" ]; then
|
|
116
|
-
mv "$WEBPACK_MODULES_INSTALL_PATH" "$OLD_WEBPACK_MODULES_INSTALL_PATH"
|
|
117
|
-
fi
|
|
118
|
-
fi
|
|
119
|
-
|
|
120
|
-
mkdir -p "$WEBPACK_MODULES_INSTALL_PATH"
|
|
121
|
-
|
|
122
|
-
# copia tutti i file presenti in webpack-modules,
|
|
123
|
-
for FILE in "${WEBPACK_MODULES_SOURCE_PATH}"/*; do
|
|
124
|
-
[ -f "$FILE" ] || continue
|
|
125
|
-
safe_cat "$FILE" "${WEBPACK_MODULES_INSTALL_PATH}/$(basename "$FILE")"
|
|
126
|
-
done
|
|
127
240
|
|
|
128
241
|
|
|
129
242
|
echo -e "\n${GREEN}...NODE MODULES${NC}"
|
|
@@ -134,7 +247,6 @@ dependencies=(
|
|
|
134
247
|
|
|
135
248
|
devDependencies=(
|
|
136
249
|
@massimo-cassandro/eslint-config
|
|
137
|
-
@massimo-cassandro/stylelint-config
|
|
138
250
|
|
|
139
251
|
@babel/core
|
|
140
252
|
@babel/preset-env
|
|
@@ -157,7 +269,6 @@ devDependencies=(
|
|
|
157
269
|
process
|
|
158
270
|
purgecss-webpack-plugin
|
|
159
271
|
responsive-loader
|
|
160
|
-
style-dictionary
|
|
161
272
|
style-loader
|
|
162
273
|
svg-url-loader
|
|
163
274
|
svgo
|
|
@@ -169,12 +280,12 @@ devDependencies=(
|
|
|
169
280
|
webpack-dev-server
|
|
170
281
|
webpack-manifest-plugin
|
|
171
282
|
webpack-remove-empty-scripts
|
|
172
|
-
|
|
173
|
-
# da installare solo se necessari
|
|
174
|
-
# dotenv-webpack
|
|
175
|
-
# @principalstudio/html-webpack-inject-preload file-loader
|
|
176
283
|
)
|
|
177
284
|
|
|
285
|
+
# pacchetti opzionali selezionati dall'utente (vedi ciclo di domande a inizio
|
|
286
|
+
# script), aggiunti all'array di installazione già definito sopra
|
|
287
|
+
devDependencies+=("${selectedOptionalPkgs[@]}")
|
|
288
|
+
|
|
178
289
|
if [ "$DEBUG" = "TRUE" ]; then
|
|
179
290
|
dependencies=( @massimo-cassandro/minimo )
|
|
180
291
|
devDependencies=()
|
|
@@ -193,6 +304,9 @@ done
|
|
|
193
304
|
|
|
194
305
|
echo -e "\n${GREEN}...creating default folders${NC}"
|
|
195
306
|
mkdir -p \
|
|
307
|
+
"_private" \
|
|
308
|
+
"${FRONTEND_INSTALL_PATH}" \
|
|
309
|
+
"${FRONTEND_INSTALL_PATH}/assets" \
|
|
196
310
|
"${FRONTEND_INSTALL_PATH}/src" \
|
|
197
311
|
"${FRONTEND_INSTALL_PATH}/css" \
|
|
198
312
|
"${FRONTEND_INSTALL_PATH}/tpl" \
|
|
@@ -202,36 +316,74 @@ mkdir -p \
|
|
|
202
316
|
"${FRONTEND_INSTALL_PATH}/error-pages"
|
|
203
317
|
|
|
204
318
|
|
|
205
|
-
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
echo -e "${GREEN}...FILES${NC}"
|
|
322
|
+
|
|
323
|
+
echo -e "${DIM}...webpack config modules${NC}"
|
|
324
|
+
# se la cartella esiste già: la prima volta viene rinominata per intero in
|
|
325
|
+
# OLD-webpack-config-modules (preservata, mai più toccata); se l'OLD-
|
|
326
|
+
# corrispondente esiste già, la cartella esistente non viene rinominata e i
|
|
327
|
+
# file al suo interno vengono gestiti singolarmente dalla stessa logica di
|
|
328
|
+
# safe_cat (via install_tree, più sotto).
|
|
329
|
+
if [ -d "$WEBPACK_MODULES_INSTALL_PATH" ]; then
|
|
330
|
+
OLD_WEBPACK_MODULES_INSTALL_PATH="$(dirname "$WEBPACK_MODULES_INSTALL_PATH")/OLD-$(basename "$WEBPACK_MODULES_INSTALL_PATH")"
|
|
331
|
+
if [ ! -e "$OLD_WEBPACK_MODULES_INSTALL_PATH" ]; then
|
|
332
|
+
mv "$WEBPACK_MODULES_INSTALL_PATH" "$OLD_WEBPACK_MODULES_INSTALL_PATH"
|
|
333
|
+
fi
|
|
334
|
+
fi
|
|
335
|
+
|
|
336
|
+
mkdir -p "$WEBPACK_MODULES_INSTALL_PATH"
|
|
337
|
+
|
|
338
|
+
# copia tutti i file di source_files/root/ nella root del progetto (inclusa
|
|
339
|
+
# webpack-config-modules/, gestita sopra a livello di cartella) e tutti i
|
|
340
|
+
# file di source_files/app/ dentro FRONTEND_INSTALL_PATH: struttura e nomi
|
|
341
|
+
# di destinazione sono già quelli definiti in source_files (per root/ con
|
|
342
|
+
# l'unica eccezione del rename dei dotfile e dei template "-tpl", vedi
|
|
343
|
+
# rename_root_file), quindi aggiungere/spostare/rinominare file lì non
|
|
344
|
+
# richiede modifiche a questo script. Per app/ si usa force_cat (nessun
|
|
345
|
+
# controllo/backup per singolo file, vedi commento su FRONTEND_INSTALL_PATH).
|
|
346
|
+
echo -e "${DIM}...root${NC}"
|
|
347
|
+
install_tree "${SOURCE_FILES_DIR}/root" "." rename_root_file
|
|
348
|
+
echo -e "${DIM}...app${NC}"
|
|
349
|
+
install_tree "${SOURCE_FILES_DIR}/app" "${FRONTEND_INSTALL_PATH}" "" force_cat
|
|
350
|
+
|
|
351
|
+
# copia tutti i file presenti in ${SOURCE_FILES_DIR}/_private,
|
|
352
|
+
echo -e "${DIM}..._private${NC}"
|
|
353
|
+
for FILE in "${SOURCE_FILES_DIR}/_private"/*; do
|
|
354
|
+
[ -f "$FILE" ] || continue
|
|
355
|
+
safe_cat_with_ports "$FILE" "_private/$(basename "$FILE")"
|
|
356
|
+
done
|
|
357
|
+
|
|
358
|
+
#----------------------------------------------
|
|
359
|
+
# copia altri file dai sorgenti minimo
|
|
360
|
+
#----------------------------------------------
|
|
206
361
|
# Sorgenti di minimo da copiare nel progetto: si usa il pacchetto appena
|
|
207
362
|
# installato in node_modules (stessa versione che userà il progetto)
|
|
208
363
|
MINIMO_PKG_DIR=./node_modules/@massimo-cassandro/minimo
|
|
209
364
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
safe_cat "${MINIMO_PKG_DIR}/src/fonts.css" "${FRONTEND_INSTALL_PATH}/css/fonts.css"
|
|
213
|
-
|
|
214
|
-
# config di build-tokens: collocato accanto al css generato (custom-properties.css).
|
|
215
|
-
safe_cat "${MINIMO_PKG_DIR}/design-tokens/tokens-config-sample.mjs" "${FRONTEND_INSTALL_PATH}/css/tokens-config.mjs"
|
|
365
|
+
force_cat "${MINIMO_PKG_DIR}/src/custom-properties.css" "${FRONTEND_INSTALL_PATH}/css/custom-properties.css"
|
|
366
|
+
force_cat "${MINIMO_PKG_DIR}/src/custom-media.css" "${FRONTEND_INSTALL_PATH}/css/custom-media.css"
|
|
216
367
|
|
|
217
368
|
# entry css principale del progetto: copia diretta di minimo.css, rinominato
|
|
218
|
-
|
|
219
|
-
safe_cat "${MINIMO_PKG_DIR}/src/minimo.css" "${FRONTEND_INSTALL_PATH}/index.css"
|
|
369
|
+
force_cat "${MINIMO_PKG_DIR}/src/minimo.css" "${FRONTEND_INSTALL_PATH}/css/index.css"
|
|
220
370
|
|
|
221
|
-
#
|
|
222
|
-
|
|
223
|
-
# favicons: istruzioni d'uso di `npx create-favicons`
|
|
224
|
-
safe_cat "${SOURCE_FILES_DIR}/favicons-readme.md" "${FRONTEND_INSTALL_PATH}/favicons/readme.md"
|
|
371
|
+
# config di build-tokens: collocato accanto al css generato (custom-properties.css).
|
|
372
|
+
force_cat "${MINIMO_PKG_DIR}/design-tokens/tokens-config-sample.mjs" "${FRONTEND_INSTALL_PATH}/css/tokens-config.mjs"
|
|
225
373
|
|
|
226
374
|
|
|
227
|
-
# entry css critical (inline nei template html) e entry js, sulla root di
|
|
228
|
-
# installazione accanto a index.css
|
|
229
|
-
safe_cat "${SOURCE_FILES_DIR}/app_index.js" "${FRONTEND_INSTALL_PATH}/index.js"
|
|
230
375
|
|
|
231
|
-
#
|
|
232
|
-
|
|
376
|
+
# favicons: config di default per `npx create-favicons`
|
|
377
|
+
force_cat "${MINIMO_PKG_DIR}/dev-tools/create-favicons/src/default-params.mjs" "${FRONTEND_INSTALL_PATH}/favicons/create-favicons-cfg.mjs"
|
|
233
378
|
|
|
234
379
|
|
|
380
|
+
if [ ${#selectedOptionalPkgs[@]} -gt 0 ]; then
|
|
381
|
+
echo -e "\n${YELLOW}Pacchetti opzionali installati:${NC}"
|
|
382
|
+
for pkg in "${selectedOptionalPkgs[@]}"; do
|
|
383
|
+
echo -e "${YELLOW} - $pkg${NC}"
|
|
384
|
+
done
|
|
385
|
+
echo -e "${YELLOW}Potrebbe essere necessaria una modifica alla configurazione webpack e/o postcss per utilizzare questi pacchetti.${NC}"
|
|
386
|
+
fi
|
|
235
387
|
|
|
236
388
|
set +C
|
|
237
389
|
echo -e "\n\n${GREEN}*** END ***${NC}"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Stylelint config
|
|
2
|
+
|
|
3
|
+
My [stylelint](https://stylelint.io/) config,
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Use
|
|
7
|
+
|
|
8
|
+
Install package:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @massimo-cassandro/minimo
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Create a `stylelint.config.mjs` file and add:
|
|
15
|
+
|
|
16
|
+
```javascript
|
|
17
|
+
export default {
|
|
18
|
+
extends: [
|
|
19
|
+
'@massimo-cassandro/minimo/stylelint-config',
|
|
20
|
+
],
|
|
21
|
+
|
|
22
|
+
// Files to be ignored
|
|
23
|
+
ignoreFiles: [
|
|
24
|
+
'node_modules/**/*.{css,scss}',
|
|
25
|
+
'vendor/**/*.{css,scss}',
|
|
26
|
+
'templates/**/*.{css,scss}',
|
|
27
|
+
'dist/**/*.css',
|
|
28
|
+
'build/**/*.css',
|
|
29
|
+
'public/**/*.css',
|
|
30
|
+
'test/**/*.css'
|
|
31
|
+
],
|
|
32
|
+
|
|
33
|
+
// Overrides
|
|
34
|
+
rules: {
|
|
35
|
+
//********************** optionally for tailwind:
|
|
36
|
+
// 'at-rule-no-unknown': [
|
|
37
|
+
// true,
|
|
38
|
+
// 'value-keyword-case': null,
|
|
39
|
+
// '@stylistic/number-no-trailing-zeros': null
|
|
40
|
+
// ],
|
|
41
|
+
//********************** /tailwind
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
```
|
|
45
|
+
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/** @type {import('stylelint').Config} */
|
|
2
|
+
|
|
3
|
+
const tailwindAtRules = ['tailwind', 'apply', 'layer', 'variants', 'responsive', 'screen', 'config'],
|
|
4
|
+
postCSSRules = ['define-mixin', 'mixin'];
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
extends: [
|
|
8
|
+
'stylelint-config-standard',
|
|
9
|
+
'stylelint-config-recess-order',
|
|
10
|
+
'@stylistic/stylelint-config'
|
|
11
|
+
],
|
|
12
|
+
plugins: [
|
|
13
|
+
'@stylistic/stylelint-plugin'
|
|
14
|
+
],
|
|
15
|
+
ignoreFiles: [
|
|
16
|
+
'node_modules/**/*.*',
|
|
17
|
+
'vendor/**/*.*',
|
|
18
|
+
'build/**/*.*',
|
|
19
|
+
'public/**/*.*',
|
|
20
|
+
'templates/**/*.*',
|
|
21
|
+
'dist/**/*.*'
|
|
22
|
+
],
|
|
23
|
+
rules: {
|
|
24
|
+
|
|
25
|
+
'alpha-value-notation': null,
|
|
26
|
+
'at-rule-empty-line-before': null,
|
|
27
|
+
'at-rule-no-vendor-prefix': true,
|
|
28
|
+
'at-rule-no-unknown': [ true, { ignoreAtRules: [ ...tailwindAtRules, ...postCSSRules ] } ],
|
|
29
|
+
'color-function-notation': 'modern',
|
|
30
|
+
'color-named': 'never',
|
|
31
|
+
'comment-empty-line-before': null,
|
|
32
|
+
'custom-property-empty-line-before': null,
|
|
33
|
+
'custom-property-pattern': null,
|
|
34
|
+
'declaration-block-no-redundant-longhand-properties': null,
|
|
35
|
+
'declaration-empty-line-before': null,
|
|
36
|
+
'declaration-no-important': true,
|
|
37
|
+
'font-family-name-quotes': 'always-where-recommended',
|
|
38
|
+
'font-weight-notation': ['numeric', { ignore: ['relative'] }],
|
|
39
|
+
'function-no-unknown': [true, { ignoreFunctions: ['theme'] }],
|
|
40
|
+
'function-url-no-scheme-relative': true,
|
|
41
|
+
'function-url-quotes': 'always',
|
|
42
|
+
'hue-degree-notation': null,
|
|
43
|
+
'import-notation': null,
|
|
44
|
+
'max-nesting-depth': [3, {
|
|
45
|
+
ignore: ['pseudo-classes', 'blockless-at-rules'],
|
|
46
|
+
ignoreAtRules: [/media/, /include/],
|
|
47
|
+
ignorePseudoClasses: ['before', 'after']
|
|
48
|
+
}],
|
|
49
|
+
'media-feature-range-notation': null,
|
|
50
|
+
'media-query-no-invalid': null,
|
|
51
|
+
'no-descending-specificity': null,
|
|
52
|
+
'number-max-precision': null,
|
|
53
|
+
'property-no-vendor-prefix': true,
|
|
54
|
+
'rule-empty-line-before': null,
|
|
55
|
+
'selector-attribute-quotes': 'always',
|
|
56
|
+
'selector-class-pattern': ['^[a-z][a-z0-9\\-]*[a-z0-9]$', { resolveNestedSelectors: true }],
|
|
57
|
+
'selector-max-attribute': 2,
|
|
58
|
+
'selector-max-class': 4,
|
|
59
|
+
'selector-max-combinators': 4,
|
|
60
|
+
'selector-max-compound-selectors': 4,
|
|
61
|
+
'selector-max-id': 0,
|
|
62
|
+
'selector-max-specificity': null,
|
|
63
|
+
'selector-max-type': [3, { ignore: ['child', 'compounded', 'descendant', 'next-sibling'] }],
|
|
64
|
+
'selector-max-universal': 1,
|
|
65
|
+
'selector-no-qualifying-type': null, // https://stylelint.io/user-guide/rules/selector-no-qualifying-type/
|
|
66
|
+
'selector-no-vendor-prefix': true,
|
|
67
|
+
'selector-not-notation': null,
|
|
68
|
+
'selector-pseudo-class-no-unknown': [true, { ignorePseudoClasses: ['global'] }],
|
|
69
|
+
'shorthand-property-no-redundant-values': true,
|
|
70
|
+
'value-keyword-case': ['lower', { ignoreKeywords: ['currentColor'] }],
|
|
71
|
+
'value-no-vendor-prefix': true,
|
|
72
|
+
|
|
73
|
+
// --- Stylistic ---
|
|
74
|
+
'@stylistic/at-rule-name-space-after': 'always',
|
|
75
|
+
'@stylistic/at-rule-semicolon-space-before': 'never',
|
|
76
|
+
'@stylistic/block-closing-brace-empty-line-before': null,
|
|
77
|
+
'@stylistic/block-closing-brace-newline-after': null,
|
|
78
|
+
'@stylistic/block-opening-brace-space-before': null,
|
|
79
|
+
'@stylistic/declaration-block-semicolon-newline-before': 'never-multi-line',
|
|
80
|
+
'@stylistic/function-max-empty-lines': 2,
|
|
81
|
+
'@stylistic/function-parentheses-space-inside': 'never-single-line',
|
|
82
|
+
'@stylistic/max-empty-lines': 2,
|
|
83
|
+
'@stylistic/max-line-length': null,
|
|
84
|
+
'@stylistic/no-empty-first-line': null,
|
|
85
|
+
'@stylistic/no-missing-end-of-source-newline': null,
|
|
86
|
+
'@stylistic/number-leading-zero': 'never',
|
|
87
|
+
'@stylistic/selector-list-comma-newline-after': 'always-multi-line',
|
|
88
|
+
'@stylistic/selector-list-comma-newline-before': 'never-multi-line',
|
|
89
|
+
'@stylistic/selector-list-comma-space-after': 'always-single-line',
|
|
90
|
+
'@stylistic/selector-list-comma-space-before': 'never-single-line',
|
|
91
|
+
'@stylistic/string-quotes': 'single',
|
|
92
|
+
'@stylistic/unicode-bom': 'never',
|
|
93
|
+
'@stylistic/value-list-comma-newline-after': 'always-multi-line',
|
|
94
|
+
'@stylistic/value-list-comma-newline-before': 'never-multi-line',
|
|
95
|
+
'@stylistic/value-list-comma-space-after': null,
|
|
96
|
+
'@stylistic/value-list-max-empty-lines': 3
|
|
97
|
+
},
|
|
98
|
+
overrides: [
|
|
99
|
+
{
|
|
100
|
+
files: ['**/*.scss'],
|
|
101
|
+
plugins: ['stylelint-scss'],
|
|
102
|
+
extends: [
|
|
103
|
+
'stylelint-config-standard-scss',
|
|
104
|
+
'stylelint-config-recess-order'
|
|
105
|
+
],
|
|
106
|
+
rules: {
|
|
107
|
+
'no-invalid-position-at-import-rule': null,
|
|
108
|
+
'scss/at-extend-no-missing-placeholder': null,
|
|
109
|
+
'scss/at-function-named-arguments': 'never',
|
|
110
|
+
'scss/at-function-parentheses-space-before': 'never',
|
|
111
|
+
'scss/at-function-pattern': '^[a-z][a-z-]*$',
|
|
112
|
+
'scss/at-if-closing-brace-newline-after': null,
|
|
113
|
+
'scss/at-if-closing-brace-space-after': null,
|
|
114
|
+
'scss/at-if-no-null': null,
|
|
115
|
+
'scss/at-mixin-argumentless-call-parentheses': 'always',
|
|
116
|
+
'scss/at-mixin-named-arguments': null,
|
|
117
|
+
'scss/at-mixin-parentheses-space-before': 'never',
|
|
118
|
+
'scss/at-mixin-pattern': null,
|
|
119
|
+
'scss/at-rule-conditional-no-parentheses': null,
|
|
120
|
+
'scss/load-no-partial-leading-underscore': true,
|
|
121
|
+
'scss/load-partial-extension': 'never',
|
|
122
|
+
|
|
123
|
+
'at-rule-no-unknown': null, // disabilita regola base per evitare conflitti
|
|
124
|
+
'scss/at-rule-no-unknown': [
|
|
125
|
+
true,
|
|
126
|
+
{
|
|
127
|
+
ignoreAtRules: [
|
|
128
|
+
...tailwindAtRules,
|
|
129
|
+
...postCSSRules,
|
|
130
|
+
// SCSS
|
|
131
|
+
'extend', 'include', 'if', 'else', 'function', 'at-root',
|
|
132
|
+
'use', 'forward', 'each', 'while', 'for', 'error', 'warn', 'debug', 'return'
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
'scss/comment-no-empty': null,
|
|
137
|
+
'scss/dimension-no-non-numeric-values': true,
|
|
138
|
+
'scss/dollar-variable-colon-space-after': 'at-least-one-space',
|
|
139
|
+
'scss/dollar-variable-colon-space-before': 'never',
|
|
140
|
+
'scss/dollar-variable-empty-line-before': null,
|
|
141
|
+
'scss/dollar-variable-no-missing-interpolation': true,
|
|
142
|
+
'scss/dollar-variable-pattern': '^[a-z][a-z-\\d]*$',
|
|
143
|
+
'scss/double-slash-comment-empty-line-before': null,
|
|
144
|
+
'scss/double-slash-comment-whitespace-inside': null,
|
|
145
|
+
'scss/no-duplicate-dollar-variables': [
|
|
146
|
+
null,
|
|
147
|
+
{ ignoreInsideAtRules: ['extend', 'if', 'mixin'] }
|
|
148
|
+
],
|
|
149
|
+
'scss/no-duplicate-mixins': true,
|
|
150
|
+
'scss/operator-no-newline-after': true,
|
|
151
|
+
'scss/operator-no-newline-before': true,
|
|
152
|
+
'scss/operator-no-unspaced': true
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
files: ['**/*.module.scss', '**/*.module.css'],
|
|
157
|
+
extends: ['stylelint-config-css-modules'],
|
|
158
|
+
rules: {
|
|
159
|
+
'selector-class-pattern': [
|
|
160
|
+
'^[a-z]+(_?[A-Z]?[a-z0-9]*)*$',
|
|
161
|
+
{
|
|
162
|
+
ignoreSelectors: [/:global/], // non funziona
|
|
163
|
+
resolveNestedSelectors: true
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
// da testare
|
|
169
|
+
// {
|
|
170
|
+
// files: ['**/*.module.scss', '**/*.module.css'],
|
|
171
|
+
// extends: ['stylelint-config-css-modules'],
|
|
172
|
+
// rules: {
|
|
173
|
+
// 'selector-class-pattern': [
|
|
174
|
+
// '^([a-z][a-z0-9]*([A-Z][a-z0-9]*)*|[a-z][a-z0-9-]*)$',
|
|
175
|
+
// { resolveNestedSelectors: true }
|
|
176
|
+
// ],
|
|
177
|
+
// 'selector-pseudo-class-no-unknown': [
|
|
178
|
+
// true,
|
|
179
|
+
// { ignorePseudoClasses: ['global', 'local'] }
|
|
180
|
+
// ]
|
|
181
|
+
// }
|
|
182
|
+
// }
|
|
183
|
+
]
|
|
184
|
+
};
|