👷 Add Lighthouse CI configuration

pull/61/head
James Panther 2021-12-21 12:11:06 +11:00
parent 4832b0900a
commit ccfd369c67
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
3 changed files with 15 additions and 1 deletions

1
.gitignore vendored
View File

@ -144,3 +144,4 @@ hugo.linux
exampleSite/public/
TODO
.lighthouseci

12
lighthouserc.js 100644
View File

@ -0,0 +1,12 @@
module.exports = {
ci: {
collect: {
startServerCommand: "npm run example",
startServerReadyPattern: "Web Server is available",
url: ["http://localhost:8008/congo/samples/markdown/"],
},
upload: {
target: "temporary-public-storage",
},
},
};

View File

@ -9,7 +9,8 @@
"assets": "rimraf assets/vendor && vendor-copy",
"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",
"example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/congo/ -p 8008"
"example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/congo/ -p 8008",
"lighthouse": "lhci autorun"
},
"repository": {
"type": "git",