👷 Add Lighthouse configuration

This commit is contained in:
James Panther 2022-06-17 11:03:06 +10:00
parent f726d8eaa3
commit 814c7774bc
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
2 changed files with 17 additions and 1 deletions

15
lighthouserc.js Normal file
View File

@ -0,0 +1,15 @@
module.exports = {
ci: {
collect: {
startServerCommand: "npm run example -- --disableLiveReload --minify",
startServerReadyPattern: "Web Server is available",
url: ["http://localhost:8008/lynx/"],
settings: {
skipAudits: ["uses-text-compression", "uses-long-cache-ttl"],
},
},
upload: {
target: "temporary-public-storage",
},
},
};

View File

@ -5,7 +5,8 @@
"scripts": { "scripts": {
"dev": "NODE_ENV=development ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w", "dev": "NODE_ENV=development ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
"build": "NODE_ENV=production ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit", "build": "NODE_ENV=production ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit",
"example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/lynx/ -p 8008" "example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/lynx/ -p 8008",
"lighthouse": "lhci autorun"
}, },
"repository": { "repository": {
"type": "git", "type": "git",