Skip to content

Commit ee9c360

Browse files
icd2k3jschrader-nr
andauthored
fix: type definitions (#29)
Co-authored-by: Justin Schrader <[email protected]>
1 parent d7f053e commit ee9c360

File tree

4 files changed

+808
-520
lines changed

4 files changed

+808
-520
lines changed

package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "use-react-router-breadcrumbs",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "A hook for displaying and setting breadcrumbs for react router",
55
"main": "dist/cjs/index.js",
66
"module": "dist/es/index.js",
@@ -15,21 +15,21 @@
1515
},
1616
"scripts": {
1717
"prepublishOnly": "yarn build && pinst --disable",
18-
"build": "rollup -c",
18+
"build": "rollup -c && yarn types",
1919
"test": "jest",
2020
"test-build": "sh ./scripts/test-build.sh",
21-
"types": "tsc -p tsconfig.json",
21+
"types": "tsc -p tsconfig.json --declaration --emitDeclarationOnly",
2222
"lint": "eslint ./src/**",
2323
"postpublish": "pinst --enable",
2424
"prepare": "husky install"
2525
},
2626
"devDependencies": {
27-
"@babel/cli": "^7.14.3",
28-
"@babel/core": "^7.14.3",
29-
"@babel/plugin-transform-runtime": "^7.14.3",
30-
"@babel/preset-env": "^7.14.4",
31-
"@babel/preset-react": "^7.13.13",
32-
"@babel/preset-typescript": "^7.13.0",
27+
"@babel/cli": "^7.14.5",
28+
"@babel/core": "^7.14.5",
29+
"@babel/plugin-transform-runtime": "^7.14.5",
30+
"@babel/preset-env": "^7.14.5",
31+
"@babel/preset-react": "^7.14.5",
32+
"@babel/preset-typescript": "^7.14.5",
3333
"@commitlint/cli": "^12.1.4",
3434
"@commitlint/config-conventional": "^12.1.4",
3535
"@rollup/plugin-babel": "^5.3.0",

rollup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const external = Object.keys(pkg.peerDependencies).concat(/@babel\/runtime/);
1010
const extensions = ['.js', '.tsx'];
1111

1212
const sharedPlugins = [
13-
typescript(),
13+
typescript({ tsconfig: './tsconfig.json' }),
1414
babel({
1515
babelHelpers: 'runtime',
1616
exclude: 'node_modules/**',

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"allowJs": true,
34
"esModuleInterop": true,
45
"forceConsistentCasingInFileNames": true,
56
"jsx": "react",

0 commit comments

Comments
 (0)