-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
package.json
75 lines (75 loc) · 3.11 KB
/
package.json
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.3.7",
"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": "npm run build && cd dist && npm i -g .",
"app:reinstall": "npm-run-all app:uninstall app:install",
"app:uninstall": "npm uninstall -g @emazzotta/lighthouse-badges; npm uninstall -g .; npm uninstall -g lighthouse-badges",
"build": "npm run build:prepare && cp -r ./src ./dist/src",
"build:prepare": "npm run clean && mkdir 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": "npm run build && npm publish --prefix dist",
"clean": "rm -rf *.svg *.html coverage dist results",
"docker:build": "npm 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 && EXEC_PATH=/home/chrome/reports npm run system-test:verify --prefix /home/lighthouse'",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"pre-push": "npm-run-all lint:fix test:all",
"run:global-installation": "[ -z ${PAGE} ] && PAGE=https://google.com ; lighthouse-badges -rsu ${PAGE} -o results",
"run:local-installation": "[ -z ${PAGE} ] && PAGE=https://google.com ; node dist/src/index.js -rsu ${PAGE} -o results",
"start": "npm-run-all build run:local-installation",
"system-test:full-run": "npm-run-all clean build app:reinstall run:global-installation system-test:verify",
"system-test:light-run": "npm-run-all clean build run:local-installation 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": "jest",
"test:all": "npm-run-all test system-test:full-run",
"test:related": "jest --findRelatedTests"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"npm run lint:fix",
"npm run test:related"
]
},
"repository": {
"type": "git",
"url": "https://github.com/emazzotta/lighthouse-badges.git"
},
"dependencies": {
"argparse": "2.0.1",
"badge-maker": "^4.1.0",
"chrome-launcher": "1.1.2",
"clui": "^0.3.6",
"lighthouse": "^12.2.2",
"ramda": "^0.30.1"
},
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@eslint/js": "^9.15.0",
"@types/jest": "^29.5.14",
"eslint": "^9.15.0",
"husky": "^9.1.7",
"jest": "^29.7.0",
"lint-staged": "^15.2.10",
"npm-run-all": "^4.1.5"
},
"engines": {
"npm": ">=7.0.0",
"node": ">=18.16"
},
"packageManager": "[email protected]",
"private": false,
"author": "Emanuele Mazzotta",
"license": "MIT"
}