1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-06-28 16:47:41 +02:00

lighthousebot setup

This commit is contained in:
Matthias Kretschmann 2019-06-09 22:53:15 +02:00
parent d5e98db286
commit 81df76b33e
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 7 additions and 3 deletions

View File

@ -3,8 +3,8 @@ language: node_js
node_js: node
cache:
npm: true
directories:
- node_modules
- public
# will run `npm install` automatically here
@ -31,6 +31,7 @@ after_success:
- pip install --user awscli
- export PATH=$PATH:$HOME/.local/bin
- npm run deploy
- npm run lh -- https://beta.matthiaskretschmann.com
notifications:
email: false

View File

@ -28,7 +28,8 @@ function truncate(n, useWordBoundary) {
//
async function getGithubRepos(data) {
const allRepos = await axios.get(
`https://api.github.com/users/${data.user}/repos?per_page=100`
`https://api.github.com/users/${data.user}/repos?per_page=100`,
{ headers: { 'User-Agent': 'kremalicious/portfolio' } }
)
const repos = allRepos.data
// filter by what's defined in content/repos.yml

View File

@ -20,7 +20,8 @@
"test": "npm run lint && jest --coverage",
"test:watch": "npm run lint && jest --coverage --watch",
"deploy": "./scripts/deploy.sh",
"new": "babel-node ./scripts/new.js"
"new": "babel-node ./scripts/new.js",
"lh": "lighthousebot --pwa=90 --perf=90 --a11y=90 --bp=90 --seo 90 --runner=wpt"
},
"dependencies": {
"axios": "^0.19.0",
@ -77,6 +78,7 @@
"jest": "^24.7.1",
"jest-canvas-mock": "^2.0.0",
"jest-dom": "^3.4.0",
"lighthousebot": "git+https://github.com/GoogleChromeLabs/lighthousebot.git",
"ora": "^3.4.0",
"prepend": "^1.0.2",
"prettier": "^1.18.2",