-
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathpackage.json
More file actions
75 lines (75 loc) · 3.24 KB
/
package.json
File metadata and controls
75 lines (75 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
"name": "@emazzotta/lighthouse-badges",
"version": "1.4.4",
"description": "🚦Generate gh-badges (shields.io) based on Lighthouse performance.",
"main": "dist/src/index.js",
"bin": {
"lighthouse-badges": "dist/src/index.js"
},
"type": "module",
"scripts": {
"app:install": "bun run build && bash scripts/install-global.sh",
"app:reinstall": "bun run app:uninstall && bun run app:install",
"app:uninstall": "bash scripts/uninstall-global.sh",
"build": "bun run build:prepare && bun run build:compile && bun run build:copy-declarations",
"build:compile": "tsc",
"build:copy-declarations": "cp src/*.d.ts dist/src/ 2>/dev/null || true",
"build:prepare": "bun run clean && mkdir -p dist && sed 's#\"dist/src/index.js\"#\"src/index.js\"#' package.json > ./dist/package.json && cp README.md dist && cp LICENSE.md dist",
"ci:publish": "bun run build && cd dist && npm publish",
"clean": "rm -rf *.svg *.html coverage dist results",
"docker:build": "bun run build && docker build --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg BUILD_DATE=`date -u +\"%Y-%m-%dT%H:%M:%SZ\"` --build-arg VERSION=latest -t emazzotta/lighthouse-badges .",
"docker:system-test:run": "docker run emazzotta/lighthouse-badges /bin/sh -c 'lighthouse-badges -rsu https://google.com && cd /home/lighthouse && EXEC_PATH=/home/chrome/reports bun run system-test:verify'",
"lint": "bunx eslint .",
"lint:fix": "bunx eslint --fix .",
"pre-push": "bun run lint:fix && bun run test:all",
"run:global": "[ -z ${PAGE} ] && PAGE=https://google.com ; lighthouse-badges -rsu ${PAGE} -o results",
"run:local": "[ -z ${PAGE} ] && PAGE=https://google.com ; bun dist/src/index.js -rsu ${PAGE} -o results",
"start": "bun run build && bun run run:local",
"system-test:full-run": "bun run clean && bun run build && bun run app:reinstall && bun run run:global && bun run system-test:verify",
"system-test:light-run": "bun run clean && bun run build && bun run run:local && bun run system-test:verify",
"system-test:verify": "[ -z ${EXEC_PATH} ] && EXEC_PATH=$PWD/results ; grep -q '<svg xmlns' ${EXEC_PATH}/*.svg && grep -q '<title>Lighthouse Report</title>' ${EXEC_PATH}/*.html",
"test": "bun test",
"test:all": "bun run test && bun run system-test:full-run",
"upgrade": "bunx npm-check-updates -i && bun install && bun update && bun run pre-push"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,ts}": [
"bun run lint:fix",
"bun run test"
]
},
"repository": {
"type": "git",
"url": "https://github.com/emazzotta/lighthouse-badges.git"
},
"dependencies": {
"argparse": "2.0.1",
"badge-maker": "^5.0.2",
"chrome-launcher": "1.2.1",
"clui": "^0.3.6",
"lighthouse": "^13.0.3",
"ramda": "^0.32.0"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/node": "^25.5.0",
"@typescript-eslint/eslint-plugin": "^8.57.0",
"@typescript-eslint/parser": "^8.57.0",
"eslint": "^10.0.3",
"globals": "^17.4.0",
"husky": "^9.1.7",
"lint-staged": "^16.4.0",
"typescript": "^5.9.3"
},
"engines": {
"bun": ">=1.0.0"
},
"private": false,
"author": "Emanuele Mazzotta",
"license": "MIT"
}