UNPKG

5.52 kBJSONView Raw
1{
2 "name": "web-vitals",
3 "version": "4.0.1",
4 "description": "Easily measure performance metrics in JavaScript",
5 "type": "module",
6 "typings": "dist/modules/index.d.ts",
7 "main": "dist/web-vitals.umd.cjs",
8 "module": "dist/web-vitals.js",
9 "unpkg": "dist/web-vitals.iife.js",
10 "exports": {
11 ".": {
12 "types": "./dist/modules/index.d.ts",
13 "require": "./dist/web-vitals.umd.cjs",
14 "default": "./dist/web-vitals.js"
15 },
16 "./attribution": {
17 "types": "./dist/modules/attribution/index.d.ts",
18 "require": "./dist/web-vitals.attribution.umd.cjs",
19 "default": "./dist/web-vitals.attribution.js"
20 },
21 "./attribution.js": {
22 "types": "./dist/modules/attribution/index.d.ts",
23 "require": "./dist/web-vitals.attribution.umd.cjs",
24 "default": "./dist/web-vitals.attribution.js"
25 },
26 "./onCLS.js": {
27 "types": "./dist/modules/onCLS.d.ts",
28 "default": "./dist/modules/onCLS.js"
29 },
30 "./onFCP.js": {
31 "types": "./dist/modules/onFCP.d.ts",
32 "default": "./dist/modules/onFCP.js"
33 },
34 "./onFID.js": {
35 "types": "./dist/modules/onFID.d.ts",
36 "default": "./dist/modules/onFID.js"
37 },
38 "./onINP.js": {
39 "types": "./dist/modules/onINP.d.ts",
40 "default": "./dist/modules/onINP.js"
41 },
42 "./onLCP.js": {
43 "types": "./dist/modules/onLCP.d.ts",
44 "default": "./dist/modules/onLCP.js"
45 },
46 "./onTTFB.js": {
47 "types": "./dist/modules/onTTFB.d.ts",
48 "default": "./dist/modules/onTTFB.js"
49 },
50 "./attribution/onCLS.js": {
51 "types": "./dist/modules/attribution/onCLS.d.ts",
52 "default": "./dist/modules/attribution/onCLS.js"
53 },
54 "./attribution/onFCP.js": {
55 "types": "./dist/modules/attribution/onFCP.d.ts",
56 "default": "./dist/modules/attribution/onFCP.js"
57 },
58 "./attribution/onFID.js": {
59 "types": "./dist/modules/attribution/onFID.d.ts",
60 "default": "./dist/modules/attribution/onFID.js"
61 },
62 "./attribution/onINP.js": {
63 "types": "./dist/modules/attribution/onINP.d.ts",
64 "default": "./dist/modules/attribution/onINP.js"
65 },
66 "./attribution/onLCP.js": {
67 "types": "./dist/modules/attribution/onLCP.d.ts",
68 "default": "./dist/modules/attribution/onLCP.js"
69 },
70 "./attribution/onTTFB.js": {
71 "types": "./dist/modules/attribution/onTTFB.d.ts",
72 "default": "./dist/modules/attribution/onTTFB.js"
73 }
74 },
75 "files": [
76 "attribution.js",
77 "attribution.d.ts",
78 "dist",
79 "src"
80 ],
81 "scripts": {
82 "build": "run-s clean build:ts build:js",
83 "build:ts": "tsc -b",
84 "build:js": "rollup -c",
85 "clean": "rm -rf dist tsconfig.tsbuildinfo",
86 "dev": "run-p watch test:server",
87 "format": "prettier \"**/*.{cjs,css,html,js,json,md,ts,yml,yaml}\" --write --ignore-path .gitignore",
88 "format:check": "prettier \"**/*.{cjs,css,html,js,json,html,md,ts,yml,yaml}\" --check --ignore-path .gitignore",
89 "lint": "eslint \"*.js\" \"src/**/*.ts\" \"test/**/*.js\"",
90 "lint:fix": "eslint --fix \"*.js\" \"src/**/*.ts\" \"test/**/*.js\"",
91 "postversion": "git push --follow-tags",
92 "release:major": "npm version major -m 'Release v%s' && npm publish",
93 "release:minor": "npm version minor -m 'Release v%s' && npm publish",
94 "release:patch": "npm version patch -m 'Release v%s' && npm publish",
95 "test": "npm-run-all build test:unit -p -r test:e2e test:server",
96 "test:e2e": "wdio wdio.conf.cjs",
97 "test:server": "node test/server.js",
98 "test:unit": "node --test test/unit/*test.js",
99 "start": "run-s build:ts test:server watch",
100 "watch": "run-p watch:*",
101 "watch:ts": "tsc -b -w",
102 "watch:js": "rollup -c -w",
103 "version": "run-s build",
104 "prepare": "husky install"
105 },
106 "keywords": [
107 "crux",
108 "performance",
109 "metrics",
110 "Core Web Vitals",
111 "CLS",
112 "FCP",
113 "FID",
114 "INP",
115 "LCP",
116 "TTFB"
117 ],
118 "author": {
119 "name": "Philip Walton",
120 "email": "philip@philipwalton.com",
121 "url": "http://philipwalton.com"
122 },
123 "license": "Apache-2.0",
124 "repository": {
125 "type": "git",
126 "url": "https://github.com/GoogleChrome/web-vitals.git"
127 },
128 "bugs": {
129 "url": "https://github.com/GoogleChrome/web-vitals/issues"
130 },
131 "husky": {
132 "hooks": {
133 "pre-commit": "npm run lint"
134 }
135 },
136 "prettier": {
137 "arrowParens": "always",
138 "bracketSpacing": false,
139 "quoteProps": "preserve",
140 "singleQuote": true
141 },
142 "devDependencies": {
143 "@babel/core": "^7.23.6",
144 "@babel/preset-env": "^7.23.6",
145 "@rollup/plugin-babel": "^6.0.4",
146 "@rollup/plugin-replace": "^5.0.5",
147 "@rollup/plugin-terser": "^0.4.4",
148 "@typescript-eslint/eslint-plugin": "^6.16.0",
149 "@typescript-eslint/parser": "^6.16.0",
150 "@wdio/cli": "^8.32.3",
151 "@wdio/local-runner": "^8.32.3",
152 "@wdio/mocha-framework": "^8.32.3",
153 "@wdio/spec-reporter": "^8.32.2",
154 "body-parser": "^1.20.2",
155 "chromedriver": "^122.0.4",
156 "eslint": "^8.56.0",
157 "express": "^4.18.2",
158 "fs-extra": "^11.2.0",
159 "husky": "^8.0.3",
160 "lint-staged": "^15.2.0",
161 "npm-run-all": "^4.1.5",
162 "nunjucks": "^3.2.4",
163 "prettier": "^3.1.1",
164 "rollup": "^4.9.1",
165 "selenium-standalone": "^9.3.1",
166 "typescript": "^5.3.3",
167 "wdio-chromedriver-service": "^8.1.1",
168 "yargs": "^17.7.2"
169 },
170 "lint-staged": {
171 "**/*.{js,ts}": "eslint --fix --ignore-path .gitignore",
172 "**/*.{cjs,css,html,js,json,html,md,ts,yml,yaml}": "prettier --write --ignore-path .gitignore"
173 }
174}