From 814c7774bc8b6b66ff2158e501c996abb00b6b8a Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Fri, 17 Jun 2022 11:03:06 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20Lighthouse=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lighthouserc.js | 15 +++++++++++++++ package.json | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 lighthouserc.js diff --git a/lighthouserc.js b/lighthouserc.js new file mode 100644 index 0000000..429e6c2 --- /dev/null +++ b/lighthouserc.js @@ -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", + }, + }, +}; diff --git a/package.json b/package.json index ecf8c92..ec8db14 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "scripts": { "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/lynx/ -p 8008" + "example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/lynx/ -p 8008", + "lighthouse": "lhci autorun" }, "repository": { "type": "git",