- Astro 7.4.0 in output statico, TypeScript strict, sitemap - ESLint (flat config, Astro + TS), Prettier, EditorConfig, .nvmrc - configurazioni di Playwright, Lighthouse CI e html-validate - script npm di §3.3 (segnaposto per gli script non ancora implementati) - README, DECISIONS, TODO-STUDIO e CHANGELOG iniziali - mockup e brief in docs/ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016zJ9ZWGKvoKoxYwbmnRKdJ
38 lines
1.2 KiB
JavaScript
38 lines
1.2 KiB
JavaScript
// Lighthouse CI — budget di §9.3 del brief (preset mobile di Lighthouse, 3 run, mediana).
|
|
// Chrome: si usa il Chromium installato da Playwright, così funziona anche nel container CI.
|
|
const { chromium } = require('playwright');
|
|
|
|
module.exports = {
|
|
ci: {
|
|
collect: {
|
|
staticDistDir: './dist',
|
|
url: [
|
|
'http://localhost/',
|
|
'http://localhost/servizi/',
|
|
'http://localhost/servizi/consulenza-fiscale-tributaria-e-societaria/',
|
|
'http://localhost/contatti/',
|
|
],
|
|
numberOfRuns: 3,
|
|
chromePath: chromium.executablePath(),
|
|
settings: {
|
|
chromeFlags: '--no-sandbox --headless=new --disable-dev-shm-usage --disable-gpu',
|
|
},
|
|
},
|
|
assert: {
|
|
preset: 'lighthouse:recommended',
|
|
aggregationMethod: 'median-run',
|
|
assertions: {
|
|
'categories:performance': ['error', { minScore: 0.95 }],
|
|
'categories:accessibility': ['error', { minScore: 1 }],
|
|
'categories:best-practices': ['error', { minScore: 0.95 }],
|
|
'categories:seo': ['error', { minScore: 1 }],
|
|
},
|
|
},
|
|
upload: {
|
|
// Nessun invio a servizi esterni: i report restano in locale.
|
|
target: 'filesystem',
|
|
outputDir: '.lighthouseci/reports',
|
|
},
|
|
},
|
|
};
|