Skip to content

Commit 43a6b49

Browse files
committed
chore: remove react from dependencies and add it to peer
1 parent dc3d8c8 commit 43a6b49

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

Readme.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,4 @@ const [scrollDir] = useDetectScroll();
5454

5555
## Demo
5656

57-
You can check the [working demo](https://runkit.com/smakss/) in runkit.
58-
59-
or
60-
6157
[![View @smakss/search](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-scroll-direction-tclwvp?fontsize=14&hidenavigation=1&theme=dark)

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
"bugs": {
44
"url": "https://github.com/SMAKSS/react-scroll-direction/issues"
55
},
6-
"dependencies": {
7-
"react": "^18.2.0"
8-
},
96
"description": "Detect scroll direction in react applications.",
107
"devDependencies": {
118
"@rollup/plugin-commonjs": "^23.0.2",
@@ -49,5 +46,5 @@
4946
"generate": "rollup -c"
5047
},
5148
"type": "module",
52-
"version": "0.0.4"
49+
"version": "0.0.5"
5350
}

rollup.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@ export default [
1818
},
1919
],
2020
plugins: [resolve(), commonjs()],
21+
external: [
22+
...Object.keys(packageJson.devDependencies || {}),
23+
...Object.keys(packageJson.peerDependencies || {}),
24+
],
2125
},
2226
];

yarn.lock

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ is-reference@1.2.1:
154154
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
155155
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
156156

157-
loose-envify@^1.1.0, loose-envify@^1.4.0:
157+
loose-envify@^1.4.0:
158158
version "1.4.0"
159159
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
160160
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
@@ -211,13 +211,6 @@ react-is@^16.13.1:
211211
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
212212
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
213213

214-
react@^18.2.0:
215-
version "18.2.0"
216-
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
217-
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
218-
dependencies:
219-
loose-envify "^1.1.0"
220-
221214
resolve@^1.22.1:
222215
version "1.22.1"
223216
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"

0 commit comments

Comments
 (0)