From ccfd369c67a1e8e1eca823e1db222b61dde2aa76 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 21 Dec 2021 12:11:06 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20Lighthouse=20CI=20configur?= =?UTF-8?q?ation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + lighthouserc.js | 12 ++++++++++++ package.json | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 lighthouserc.js diff --git a/.gitignore b/.gitignore index 5706f473..7b2b1e95 100644 --- a/.gitignore +++ b/.gitignore @@ -144,3 +144,4 @@ hugo.linux exampleSite/public/ TODO +.lighthouseci diff --git a/lighthouserc.js b/lighthouserc.js new file mode 100644 index 00000000..4aff39ca --- /dev/null +++ b/lighthouserc.js @@ -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", + }, + }, +}; diff --git a/package.json b/package.json index 6b51cdf2..27575223 100644 --- a/package.json +++ b/package.json @@ -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",