-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
package.json
125 lines (125 loc) · 4.13 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
"name": "mezr",
"version": "1.1.0",
"description": "Measure and compare the dimensions and distances of DOM elements.",
"keywords": [
"dom",
"width",
"height",
"offset",
"position",
"dimension",
"element",
"overlap",
"collision",
"intersection"
],
"homepage": "https://github.com/niklasramo/mezr",
"license": "MIT",
"author": {
"name": "Niklas Rämö",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "[email protected]:niklasramo/mezr.git"
},
"type": "module",
"source": "./src/index.ts",
"umd:main": "./dist/umd/mezr.js",
"umd:types": "./dist/umd/mezr.d.ts",
"main": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
},
"./getContainingBlock": {
"import": "./dist/esm/getContainingBlock.js",
"require": "./dist/cjs/getContainingBlock.js"
},
"./getDistance": {
"import": "./dist/esm/getDistance.js",
"require": "./dist/cjs/getDistance.js"
},
"./getHeight": {
"import": "./dist/esm/getHeight.js",
"require": "./dist/cjs/getHeight.js"
},
"./getIntersection": {
"import": "./dist/esm/getIntersection.js",
"require": "./dist/cjs/getIntersection.js"
},
"./getOffset": {
"import": "./dist/esm/getOffset.js",
"require": "./dist/cjs/getOffset.js"
},
"./getOffsetContainer": {
"import": "./dist/esm/getOffsetContainer.js",
"require": "./dist/cjs/getOffsetContainer.js"
},
"./getOverflow": {
"import": "./dist/esm/getOverflow.js",
"require": "./dist/cjs/getOverflow.js"
},
"./getRect": {
"import": "./dist/esm/getRect.js",
"require": "./dist/cjs/getRect.js"
},
"./getWidth": {
"import": "./dist/esm/getWidth.js",
"require": "./dist/cjs/getWidth.js"
}
},
"files": [
"src",
"dist",
"package.json",
"README.md",
"LICENSE.md"
],
"scripts": {
"build": "npm run del-dist && npm run ts-check && npm run format && npm run build-esm && npm run build-cjs && npm run build-umd && npm run build-tests && npm run minify && npm run size",
"build-esm": "tsc --project tsconfig.build-esm.json",
"build-cjs": "tsc --project tsconfig.build-cjs.json && node ./scripts/post-build-cjs.js",
"build-umd": "rollup --config rollup.config.build-umd.ts --configPlugin typescript",
"build-tests": "rollup --config rollup.config.build-tests.ts --configPlugin typescript",
"del-dist": "rimraf ./dist && rimraf ./tests/unit/dist",
"format": "prettier --write --no-error-on-unmatched-pattern \"./**/*.{js,ts,jsx,tsx,css,html,json,md,yml}\"",
"format-check": "prettier --check --no-error-on-unmatched-pattern \"./**/*.{js,ts,jsx,tsx,css,html,json,md,yml}\"",
"minify": "find ./dist -name '*.js' -exec terser {} -o {} -c -m --comments false \\;",
"size": "find ./dist/umd -name 'mezr.js' -exec echo {} \\; -exec gzip-size {} --include-original \\;",
"test": "npm run ts-check && npm run test-usage && npm run test-browserstack",
"test-esm-usage": "cd tests/usage/esm && npm install && npm test",
"test-cjs-usage": "cd tests/usage/cjs && npm install && npm test",
"test-usage": "npm run test-esm-usage && npm run test-cjs-usage",
"test-chrome": "karma start karma.chrome-local.cjs",
"test-firefox": "karma start karma.firefox-local.cjs",
"test-browserstack": "karma start karma.browserstack.cjs",
"ts-check": "tsc --noEmit"
},
"devDependencies": {
"@rollup/plugin-typescript": "11.1.5",
"@types/chai": "4.3.11",
"@types/mocha": "10.0.6",
"chai": "4.3.10",
"csstype": "3.1.2",
"dotenv": "16.3.1",
"gzip-size-cli": "5.1.0",
"karma": "6.4.2",
"karma-browserstack-launcher": "1.6.0",
"karma-chrome-launcher": "3.2.0",
"karma-firefox-launcher": "2.1.2",
"karma-mocha": "2.0.1",
"karma-mocha-reporter": "2.2.5",
"mocha": "10.2.0",
"prettier": "3.1.0",
"rimraf": "5.0.5",
"rollup": "4.5.2",
"rollup-plugin-dts": "6.1.0",
"terser": "5.24.0",
"tslib": "2.6.2",
"typescript": "5.3.2"
}
}