/
package.json
118 lines (118 loc) 路 3.03 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
{
"name": "wouter",
"version": "2.5.2",
"description": "A minimalistic routing for React and Preact. Nothing extra, just HOOKS.",
"keywords": [
"react",
"preact",
"router",
"tiny",
"routing",
"hooks",
"useLocation"
],
"files": [
"*.js",
"*.d.ts",
"preact",
"cjs"
],
"type": "module",
"exports": {
".": {
"require": "./cjs/index.js",
"default": "./index.js"
},
"./use-location": {
"require": "./cjs/use-location.js",
"default": "./use-location.js"
},
"./matcher": {
"require": "./cjs/matcher.js",
"default": "./matcher.js"
},
"./static-location": {
"require": "./cjs/static-location.js",
"default": "./static-location.js"
}
},
"main": "cjs/index.js",
"module": "index.js",
"types": "index.d.ts",
"scripts": {
"test": "jest --verbose --coverage",
"size": "size-limit",
"lint-types": "npm run types-preact && dtslint types --onlyTestTsNext && dtslint types/preact --onlyTestTsNext",
"types-react": "copyfiles -f types/*.d.ts .",
"types-preact": "copyfiles -f {index,matcher,use-location,static-location}.js types/{matcher,use-location,static-location}.d.ts types/preact/*.d.ts preact/",
"bundle": "rollup -e react,preact,preact/hooks -f cjs --exports named --preserveModules -d ${DIR}cjs ${DIR}*.js && rollup -f cjs -d ${DIR}cjs ${DIR}static-location.js && echo '{\"type\": \"commonjs\"}' > ${DIR}cjs/package.json",
"prepublishOnly": "npm run types-react && npm run types-preact && npm run bundle && DIR=./preact/ npm run bundle"
},
"author": "Alexey Taktarov <molefrog@gmail.com>",
"license": "ISC",
"peerDependencies": {
"react": "^16.8.0"
},
"repository": "molefrog/wouter",
"size-limit": [
{
"path": "index.js",
"limit": "1337 B"
},
{
"path": "use-location.js",
"limit": "377 B"
}
],
"eslintConfig": {
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"node": true,
"jest": true
},
"rules": {
"no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
},
"plugins": [
"react-hooks"
]
},
"jest": {
"transform": {
"\\.js$": "jest-esm-jsx-transform"
}
},
"devDependencies": {
"@size-limit/preset-small-lib": "^2.2.4",
"@testing-library/react": "^9.1.3",
"@testing-library/react-hooks": "^2.0.1",
"@types/react": "^16.8.23",
"copyfiles": "^2.1.0",
"dtslint": "^0.9.0",
"eslint": "^6.2.1",
"eslint-plugin-react-hooks": "^1.7.0",
"jest": "^24.9.0",
"jest-esm-jsx-transform": "^1.0.0",
"preact": "^10.0.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-test-renderer": "^16.9.0",
"rollup": "^1.19.4"
}
}