UNPKG

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