From 438a044824bb5d6fc5b5a801d1ad2575e9223c17 Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 11 Sep 2022 16:17:50 +0200 Subject: [PATCH] refactor: move usehooks-ts to the root folder --- jest.config.base.ts | 5 +- lib/README.md | 62 ----- lib/package-lock.json | 257 ------------------ lib/package.json | 44 --- lib/tsconfig.json | 9 - package-lock.json | 15 +- package.json | 27 +- {lib/src => src}/index.ts | 0 {lib/src => src}/useBoolean/index.ts | 0 .../src => src}/useBoolean/useBoolean.test.ts | 0 {lib/src => src}/useBoolean/useBoolean.ts | 0 {lib/src => src}/useClickAnyWhere/index.ts | 0 .../useClickAnyWhere/useClickAnyWhere.ts | 0 {lib/src => src}/useCopyToClipboard/index.ts | 0 .../useCopyToClipboard.test.ts | 0 .../useCopyToClipboard/useCopyToClipboard.ts | 0 {lib/src => src}/useCountdown/index.ts | 0 .../useCountdown/useCountdown.test.ts | 0 {lib/src => src}/useCountdown/useCountdown.ts | 0 {lib/src => src}/useCounter/index.ts | 0 .../src => src}/useCounter/useCounter.test.ts | 0 {lib/src => src}/useCounter/useCounter.ts | 0 {lib/src => src}/useDarkMode/index.ts | 0 .../useDarkMode/useDarkMode.test.ts | 0 {lib/src => src}/useDarkMode/useDarkMode.ts | 0 {lib/src => src}/useDebounce/index.ts | 0 .../useDebounce/useDebounce.test.ts | 0 {lib/src => src}/useDebounce/useDebounce.ts | 0 {lib/src => src}/useEffectOnce/index.ts | 0 .../useEffectOnce/useEffectOnce.test.ts | 0 .../useEffectOnce/useEffectOnce.ts | 0 {lib/src => src}/useElementSize/index.ts | 0 .../useElementSize/useElementSize.test.ts | 0 .../useElementSize/useElementSize.ts | 0 {lib/src => src}/useEventCallback/index.ts | 0 .../useEventCallback/useEventCallback.ts | 0 {lib/src => src}/useEventListener/index.ts | 0 .../useEventListener/useEventListener.test.ts | 0 .../useEventListener/useEventListener.ts | 0 {lib/src => src}/useFetch/index.ts | 0 {lib/src => src}/useFetch/useFetch.ts | 0 {lib/src => src}/useHover/index.ts | 0 {lib/src => src}/useHover/useHover.test.ts | 0 {lib/src => src}/useHover/useHover.ts | 0 {lib/src => src}/useImageOnLoad/index.ts | 0 .../useImageOnLoad/useImageOnLoad.ts | 0 .../useIntersectionObserver/index.ts | 0 .../useIntersectionObserver.ts | 0 {lib/src => src}/useInterval/index.ts | 0 .../useInterval/useInterval.test.ts | 0 {lib/src => src}/useInterval/useInterval.ts | 0 {lib/src => src}/useIsClient/index.ts | 0 .../useIsClient/useIsClient.test.ts | 0 {lib/src => src}/useIsClient/useIsClient.ts | 0 {lib/src => src}/useIsFirstRender/index.ts | 0 .../useIsFirstRender/useIsFirstRender.test.ts | 0 .../useIsFirstRender/useIsFirstRender.ts | 0 {lib/src => src}/useIsMounted/index.ts | 0 .../useIsMounted/useIsMounted.test.ts | 0 {lib/src => src}/useIsMounted/useIsMounted.ts | 0 .../useIsomorphicLayoutEffect/index.ts | 0 .../useIsomorphicLayoutEffect.ts | 0 {lib/src => src}/useLocalStorage/index.ts | 0 .../useLocalStorage/useLocalStorage.test.ts | 0 .../useLocalStorage/useLocalStorage.ts | 0 {lib/src => src}/useLockedBody/index.ts | 0 .../useLockedBody/useLockedBody.ts | 0 {lib/src => src}/useMap/index.ts | 0 {lib/src => src}/useMap/useMap.test.ts | 0 {lib/src => src}/useMap/useMap.ts | 0 {lib/src => src}/useMediaQuery/index.ts | 0 .../useMediaQuery/useMediaQuery.ts | 0 {lib/src => src}/useOnClickOutside/index.ts | 0 .../useOnClickOutside/useOnClickOutside.ts | 0 {lib/src => src}/useReadLocalStorage/index.ts | 0 .../useReadLocalStorage.test.ts | 0 .../useReadLocalStorage.ts | 0 {lib/src => src}/useScreen/index.ts | 0 {lib/src => src}/useScreen/useScreen.ts | 0 {lib/src => src}/useScript/index.ts | 0 {lib/src => src}/useScript/useScript.ts | 0 {lib/src => src}/useSessionStorage/index.ts | 0 .../useSessionStorage.test.ts | 0 .../useSessionStorage/useSessionStorage.ts | 0 {lib/src => src}/useSsr/index.ts | 0 {lib/src => src}/useSsr/useSsr.ts | 0 {lib/src => src}/useStep/index.ts | 0 {lib/src => src}/useStep/useStep.test.ts | 0 {lib/src => src}/useStep/useStep.ts | 0 {lib/src => src}/useTernaryDarkMode/index.ts | 0 .../useTernaryDarkMode/useTernaryDarkMode.ts | 0 {lib/src => src}/useTimeout/index.ts | 0 .../src => src}/useTimeout/useTimeout.test.ts | 0 {lib/src => src}/useTimeout/useTimeout.ts | 0 {lib/src => src}/useUpdateEffect/index.ts | 0 .../useUpdateEffect/useUpdateEffect.test.ts | 0 .../useUpdateEffect/useUpdateEffect.ts | 0 {lib/src => src}/useWindowSize/index.ts | 0 .../useWindowSize/useWindowSize.test.ts | 0 .../useWindowSize/useWindowSize.ts | 0 ...tsconfig.build.json => tsconfig.build.json | 2 +- tsconfig.json | 6 +- 102 files changed, 37 insertions(+), 390 deletions(-) delete mode 100644 lib/README.md delete mode 100644 lib/package-lock.json delete mode 100644 lib/package.json delete mode 100644 lib/tsconfig.json rename {lib/src => src}/index.ts (100%) rename {lib/src => src}/useBoolean/index.ts (100%) rename {lib/src => src}/useBoolean/useBoolean.test.ts (100%) rename {lib/src => src}/useBoolean/useBoolean.ts (100%) rename {lib/src => src}/useClickAnyWhere/index.ts (100%) rename {lib/src => src}/useClickAnyWhere/useClickAnyWhere.ts (100%) rename {lib/src => src}/useCopyToClipboard/index.ts (100%) rename {lib/src => src}/useCopyToClipboard/useCopyToClipboard.test.ts (100%) rename {lib/src => src}/useCopyToClipboard/useCopyToClipboard.ts (100%) rename {lib/src => src}/useCountdown/index.ts (100%) rename {lib/src => src}/useCountdown/useCountdown.test.ts (100%) rename {lib/src => src}/useCountdown/useCountdown.ts (100%) rename {lib/src => src}/useCounter/index.ts (100%) rename {lib/src => src}/useCounter/useCounter.test.ts (100%) rename {lib/src => src}/useCounter/useCounter.ts (100%) rename {lib/src => src}/useDarkMode/index.ts (100%) rename {lib/src => src}/useDarkMode/useDarkMode.test.ts (100%) rename {lib/src => src}/useDarkMode/useDarkMode.ts (100%) rename {lib/src => src}/useDebounce/index.ts (100%) rename {lib/src => src}/useDebounce/useDebounce.test.ts (100%) rename {lib/src => src}/useDebounce/useDebounce.ts (100%) rename {lib/src => src}/useEffectOnce/index.ts (100%) rename {lib/src => src}/useEffectOnce/useEffectOnce.test.ts (100%) rename {lib/src => src}/useEffectOnce/useEffectOnce.ts (100%) rename {lib/src => src}/useElementSize/index.ts (100%) rename {lib/src => src}/useElementSize/useElementSize.test.ts (100%) rename {lib/src => src}/useElementSize/useElementSize.ts (100%) rename {lib/src => src}/useEventCallback/index.ts (100%) rename {lib/src => src}/useEventCallback/useEventCallback.ts (100%) rename {lib/src => src}/useEventListener/index.ts (100%) rename {lib/src => src}/useEventListener/useEventListener.test.ts (100%) rename {lib/src => src}/useEventListener/useEventListener.ts (100%) rename {lib/src => src}/useFetch/index.ts (100%) rename {lib/src => src}/useFetch/useFetch.ts (100%) rename {lib/src => src}/useHover/index.ts (100%) rename {lib/src => src}/useHover/useHover.test.ts (100%) rename {lib/src => src}/useHover/useHover.ts (100%) rename {lib/src => src}/useImageOnLoad/index.ts (100%) rename {lib/src => src}/useImageOnLoad/useImageOnLoad.ts (100%) rename {lib/src => src}/useIntersectionObserver/index.ts (100%) rename {lib/src => src}/useIntersectionObserver/useIntersectionObserver.ts (100%) rename {lib/src => src}/useInterval/index.ts (100%) rename {lib/src => src}/useInterval/useInterval.test.ts (100%) rename {lib/src => src}/useInterval/useInterval.ts (100%) rename {lib/src => src}/useIsClient/index.ts (100%) rename {lib/src => src}/useIsClient/useIsClient.test.ts (100%) rename {lib/src => src}/useIsClient/useIsClient.ts (100%) rename {lib/src => src}/useIsFirstRender/index.ts (100%) rename {lib/src => src}/useIsFirstRender/useIsFirstRender.test.ts (100%) rename {lib/src => src}/useIsFirstRender/useIsFirstRender.ts (100%) rename {lib/src => src}/useIsMounted/index.ts (100%) rename {lib/src => src}/useIsMounted/useIsMounted.test.ts (100%) rename {lib/src => src}/useIsMounted/useIsMounted.ts (100%) rename {lib/src => src}/useIsomorphicLayoutEffect/index.ts (100%) rename {lib/src => src}/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts (100%) rename {lib/src => src}/useLocalStorage/index.ts (100%) rename {lib/src => src}/useLocalStorage/useLocalStorage.test.ts (100%) rename {lib/src => src}/useLocalStorage/useLocalStorage.ts (100%) rename {lib/src => src}/useLockedBody/index.ts (100%) rename {lib/src => src}/useLockedBody/useLockedBody.ts (100%) rename {lib/src => src}/useMap/index.ts (100%) rename {lib/src => src}/useMap/useMap.test.ts (100%) rename {lib/src => src}/useMap/useMap.ts (100%) rename {lib/src => src}/useMediaQuery/index.ts (100%) rename {lib/src => src}/useMediaQuery/useMediaQuery.ts (100%) rename {lib/src => src}/useOnClickOutside/index.ts (100%) rename {lib/src => src}/useOnClickOutside/useOnClickOutside.ts (100%) rename {lib/src => src}/useReadLocalStorage/index.ts (100%) rename {lib/src => src}/useReadLocalStorage/useReadLocalStorage.test.ts (100%) rename {lib/src => src}/useReadLocalStorage/useReadLocalStorage.ts (100%) rename {lib/src => src}/useScreen/index.ts (100%) rename {lib/src => src}/useScreen/useScreen.ts (100%) rename {lib/src => src}/useScript/index.ts (100%) rename {lib/src => src}/useScript/useScript.ts (100%) rename {lib/src => src}/useSessionStorage/index.ts (100%) rename {lib/src => src}/useSessionStorage/useSessionStorage.test.ts (100%) rename {lib/src => src}/useSessionStorage/useSessionStorage.ts (100%) rename {lib/src => src}/useSsr/index.ts (100%) rename {lib/src => src}/useSsr/useSsr.ts (100%) rename {lib/src => src}/useStep/index.ts (100%) rename {lib/src => src}/useStep/useStep.test.ts (100%) rename {lib/src => src}/useStep/useStep.ts (100%) rename {lib/src => src}/useTernaryDarkMode/index.ts (100%) rename {lib/src => src}/useTernaryDarkMode/useTernaryDarkMode.ts (100%) rename {lib/src => src}/useTimeout/index.ts (100%) rename {lib/src => src}/useTimeout/useTimeout.test.ts (100%) rename {lib/src => src}/useTimeout/useTimeout.ts (100%) rename {lib/src => src}/useUpdateEffect/index.ts (100%) rename {lib/src => src}/useUpdateEffect/useUpdateEffect.test.ts (100%) rename {lib/src => src}/useUpdateEffect/useUpdateEffect.ts (100%) rename {lib/src => src}/useWindowSize/index.ts (100%) rename {lib/src => src}/useWindowSize/useWindowSize.test.ts (100%) rename {lib/src => src}/useWindowSize/useWindowSize.ts (100%) rename lib/tsconfig.build.json => tsconfig.build.json (88%) diff --git a/jest.config.base.ts b/jest.config.base.ts index 3cbd8b33..8b6a5e8d 100644 --- a/jest.config.base.ts +++ b/jest.config.base.ts @@ -1,9 +1,7 @@ import { Config } from '@jest/types' import glob from 'glob' -const packages = glob - .sync(`./{site,lib}`) - .map(p => p.replace(/^\./, ``)) +const packages = glob.sync(`./src`).map(p => p.replace(/^\./, ``)) const ignoreDirs = [ 'build/', @@ -14,6 +12,7 @@ const ignoreDirs = [ 'public/', 'generators/', 'generated/', + 'site/', ] const config: Config.InitialOptions = { diff --git a/lib/README.md b/lib/README.md deleted file mode 100644 index 379c0ffb..00000000 --- a/lib/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# usehooks-ts - -> React hook library, ready to use, written in Typescript. - -![npm bundle size](https://img.shields.io/bundlephobia/minzip/usehooks-ts) -![npm](https://img.shields.io/npm/v/usehooks-ts) -[![License](https://badgen.net/badge/License/MIT/blue)](../../LICENSE) - -## Install - -```bash -npm i usehooks-ts -``` - -## Summary - - - -- [`useBoolean()`](https://usehooks-ts.com/react-hook/use-boolean) -- [`useClickAnyWhere()`](https://usehooks-ts.com/react-hook/use-click-any-where) -- [`useCopyToClipboard()`](https://usehooks-ts.com/react-hook/use-copy-to-clipboard) -- [`useCountdown()`](https://usehooks-ts.com/react-hook/use-countdown) -- [`useCounter()`](https://usehooks-ts.com/react-hook/use-counter) -- [`useDarkMode()`](https://usehooks-ts.com/react-hook/use-dark-mode) -- [`useDebounce()`](https://usehooks-ts.com/react-hook/use-debounce) -- [`useEffectOnce()`](https://usehooks-ts.com/react-hook/use-effect-once) -- [`useElementSize()`](https://usehooks-ts.com/react-hook/use-element-size) -- [`useEventListener()`](https://usehooks-ts.com/react-hook/use-event-listener) -- [`useFetch()`](https://usehooks-ts.com/react-hook/use-fetch) -- [`useHover()`](https://usehooks-ts.com/react-hook/use-hover) -- [`useImageOnLoad()`](https://usehooks-ts.com/react-hook/use-image-on-load) -- [`useIntersectionObserver()`](https://usehooks-ts.com/react-hook/use-intersection-observer) -- [`useInterval()`](https://usehooks-ts.com/react-hook/use-interval) -- [`useIsClient()`](https://usehooks-ts.com/react-hook/use-is-client) -- [`useIsFirstRender()`](https://usehooks-ts.com/react-hook/use-is-first-render) -- [`useIsMounted()`](https://usehooks-ts.com/react-hook/use-is-mounted) -- [`useIsomorphicLayoutEffect()`](https://usehooks-ts.com/react-hook/use-isomorphic-layout-effect) -- [`useLocalStorage()`](https://usehooks-ts.com/react-hook/use-local-storage) -- [`useLockedBody()`](https://usehooks-ts.com/react-hook/use-locked-body) -- [`useMap()`](https://usehooks-ts.com/react-hook/use-map) -- [`useMediaQuery()`](https://usehooks-ts.com/react-hook/use-media-query) -- [`useOnClickOutside()`](https://usehooks-ts.com/react-hook/use-on-click-outside) -- [`useReadLocalStorage()`](https://usehooks-ts.com/react-hook/use-read-local-storage) -- [`useScreen()`](https://usehooks-ts.com/react-hook/use-screen) -- [`useScript()`](https://usehooks-ts.com/react-hook/use-script) -- [`useSessionStorage()`](https://usehooks-ts.com/react-hook/use-session-storage) -- [`useSsr()`](https://usehooks-ts.com/react-hook/use-ssr) -- [`useStep()`](https://usehooks-ts.com/react-hook/use-step) -- [`useTernaryDarkMode()`](https://usehooks-ts.com/react-hook/use-ternary-dark-mode) -- [`useTimeout()`](https://usehooks-ts.com/react-hook/use-timeout) -- [`useUpdateEffect()`](https://usehooks-ts.com/react-hook/use-update-effect) -- [`useWindowSize()`](https://usehooks-ts.com/react-hook/use-window-size) - - - -## Usage - -See [documentation](https://usehooks-ts.com). - -## License - -[MIT](../../LICENSE) diff --git a/lib/package-lock.json b/lib/package-lock.json deleted file mode 100644 index a5e4b3a2..00000000 --- a/lib/package-lock.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "name": "usehooks-ts", - "version": "2.6.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "usehooks-ts", - "version": "2.5.3", - "license": "MIT", - "devDependencies": { - "@testing-library/react-hooks": "^8.0.0", - "react": ">=16.9.0", - "react-dom": ">=16.9.0", - "typescript": "^4.6.4" - }, - "peerDependencies": { - "react": ">=16.9.0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.3.tgz", - "integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==", - "dev": true, - "dependencies": { - "regenerator-runtime": "^0.13.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@testing-library/react-hooks": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@testing-library/react-hooks/-/react-hooks-8.0.0.tgz", - "integrity": "sha512-uZqcgtcUUtw7Z9N32W13qQhVAD+Xki2hxbTR461MKax8T6Jr8nsUvZB+vcBTkzY2nFvsUet434CsgF0ncW2yFw==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.12.5", - "react-error-boundary": "^3.1.0" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "@types/react": "^16.9.0 || ^17.0.0", - "react": "^16.9.0 || ^17.0.0", - "react-dom": "^16.9.0 || ^17.0.0", - "react-test-renderer": "^16.9.0 || ^17.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react-dom": { - "optional": true - }, - "react-test-renderer": { - "optional": true - } - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "dev": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", - "dev": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" - }, - "peerDependencies": { - "react": "17.0.2" - } - }, - "node_modules/react-error-boundary": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-3.1.4.tgz", - "integrity": "sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.12.5" - }, - "engines": { - "node": ">=10", - "npm": ">=6" - }, - "peerDependencies": { - "react": ">=16.13.1" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true - }, - "node_modules/scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", - "dev": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "node_modules/typescript": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz", - "integrity": "sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - } - }, - "dependencies": { - "@babel/runtime": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.3.tgz", - "integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@testing-library/react-hooks": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@testing-library/react-hooks/-/react-hooks-8.0.0.tgz", - "integrity": "sha512-uZqcgtcUUtw7Z9N32W13qQhVAD+Xki2hxbTR461MKax8T6Jr8nsUvZB+vcBTkzY2nFvsUet434CsgF0ncW2yFw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.12.5", - "react-error-boundary": "^3.1.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" - } - }, - "react-error-boundary": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-3.1.4.tgz", - "integrity": "sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==", - "dev": true, - "requires": { - "@babel/runtime": "^7.12.5" - } - }, - "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true - }, - "scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "typescript": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz", - "integrity": "sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==", - "dev": true - } - } -} diff --git a/lib/package.json b/lib/package.json deleted file mode 100644 index 52fd0c01..00000000 --- a/lib/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "usehooks-ts", - "private": false, - "description": "React hook library, ready to use, written in Typescript.", - "version": "2.6.0", - "author": "Julien CARON ", - "homepage": "https://usehooks-ts.com", - "keywords": [ - "typescript", - "react", - "react-hooks", - "npm" - ], - "license": "MIT", - "main": "./dist/cjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/esm/index.d.ts", - "scripts": { - "prebuild": "npm run clean", - "start": "chokidar \"src/**/*.ts\" -c \"npm run build\"", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc -p tsconfig.build.json --module commonjs --outDir dist/cjs", - "build:esm": "tsc -p tsconfig.build.json --module esNext --outDir dist/esm", - "clean": "rimraf -rf ./dist", - "types-check": "tsc -p tsconfig.json" - }, - "devDependencies": { - "@testing-library/react-hooks": "^8.0.0", - "react": ">=16.9.0", - "react-dom": ">=16.9.0", - "typescript": "^4.6.4" - }, - "peerDependencies": { - "react": ">=16.9.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/juliencrn/usehooks-ts" - }, - "bugs": { - "url": "https://github.com/juliencrn/usehooks-ts/issues" - }, - "gitHead": "05340494dd6e96fa501695936b6fb51c051ffd40" -} diff --git a/lib/tsconfig.json b/lib/tsconfig.json deleted file mode 100644 index 31aaa948..00000000 --- a/lib/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../tsconfig.base.json", - - "compilerOptions": { - "noEmit": true - }, - - "include": ["src/**/*"] -} diff --git a/package-lock.json b/package-lock.json index 7669a79d..18648fb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,15 @@ { "name": "usehooks-ts", + "version": "2.6.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "usehooks-ts", + "version": "2.6.0", "license": "MIT", "workspaces": [ - "./site", - "./lib" + "./site" ], "devDependencies": { "@testing-library/react": "^12.1.2", @@ -38,10 +39,14 @@ "npm-run-all": "^4.1.5", "plop": "^3.0.5", "prettier": "^2.5.1", + "react": ">=16.9.0", + "react-dom": ">=16.9.0", "rimraf": "^3.0.2", "ts-node": "^10.2.1", - "typescript": "^4.5.5", - "usehooks-ts": "file:lib" + "typescript": "^4.5.5" + }, + "peerDependencies": { + "react": "^16.9.0 || ^17.0.0 || ^18.0.0" } }, "lib": { @@ -25307,7 +25312,6 @@ "version": "16.14.0", "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", - "peer": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -52960,7 +52964,6 @@ "version": "16.14.0", "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", - "peer": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", diff --git a/package.json b/package.json index 1af948cf..7f76de8c 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,33 @@ { "name": "usehooks-ts", - "private": true, + "private": false, + "version": "2.6.0", "description": "React hook library, ready to use, written in Typescript.", "author": "Julien CARON ", "homepage": "https://usehooks-ts.com", "keywords": [ - "gatsby", "typescript", "react", - "npm", + "react-hooks", "hooks", - "react-hooks" + "npm" ], "license": "MIT", + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/esm/index.d.ts", "workspaces": [ "./site" ], "scripts": { + "prebuild": "npm run clean", + "start": "chokidar \"src/**/*.ts\" -c \"npm run build\"", + "build": "npm run build:cjs && npm run build:esm", + "build:cjs": "tsc -p tsconfig.build.json --module commonjs --outDir dist/cjs", + "build:esm": "tsc -p tsconfig.build.json --module esNext --outDir dist/esm", + "test": "jest", + "clean": "rimraf -rf ./dist", + "types-check": "tsc -p tsconfig.json", "legacy-clean": "lerna run clean && lerna clean -y", "legacy-bootstrap": "npm ci && lerna exec npm ci && npm run copy:hooks && npm run build:lib", "legacy-types-check": "lerna run types-check", @@ -73,10 +84,14 @@ "npm-run-all": "^4.1.5", "plop": "^3.0.5", "prettier": "^2.5.1", + "react": ">=16.9.0", + "react-dom": ">=16.9.0", "rimraf": "^3.0.2", "ts-node": "^10.2.1", - "typescript": "^4.5.5", - "usehooks-ts": "file:lib" + "typescript": "^4.5.5" + }, + "peerDependencies": { + "react": "^16.9.0 || ^17.0.0 || ^18.0.0" }, "repository": { "type": "git", diff --git a/lib/src/index.ts b/src/index.ts similarity index 100% rename from lib/src/index.ts rename to src/index.ts diff --git a/lib/src/useBoolean/index.ts b/src/useBoolean/index.ts similarity index 100% rename from lib/src/useBoolean/index.ts rename to src/useBoolean/index.ts diff --git a/lib/src/useBoolean/useBoolean.test.ts b/src/useBoolean/useBoolean.test.ts similarity index 100% rename from lib/src/useBoolean/useBoolean.test.ts rename to src/useBoolean/useBoolean.test.ts diff --git a/lib/src/useBoolean/useBoolean.ts b/src/useBoolean/useBoolean.ts similarity index 100% rename from lib/src/useBoolean/useBoolean.ts rename to src/useBoolean/useBoolean.ts diff --git a/lib/src/useClickAnyWhere/index.ts b/src/useClickAnyWhere/index.ts similarity index 100% rename from lib/src/useClickAnyWhere/index.ts rename to src/useClickAnyWhere/index.ts diff --git a/lib/src/useClickAnyWhere/useClickAnyWhere.ts b/src/useClickAnyWhere/useClickAnyWhere.ts similarity index 100% rename from lib/src/useClickAnyWhere/useClickAnyWhere.ts rename to src/useClickAnyWhere/useClickAnyWhere.ts diff --git a/lib/src/useCopyToClipboard/index.ts b/src/useCopyToClipboard/index.ts similarity index 100% rename from lib/src/useCopyToClipboard/index.ts rename to src/useCopyToClipboard/index.ts diff --git a/lib/src/useCopyToClipboard/useCopyToClipboard.test.ts b/src/useCopyToClipboard/useCopyToClipboard.test.ts similarity index 100% rename from lib/src/useCopyToClipboard/useCopyToClipboard.test.ts rename to src/useCopyToClipboard/useCopyToClipboard.test.ts diff --git a/lib/src/useCopyToClipboard/useCopyToClipboard.ts b/src/useCopyToClipboard/useCopyToClipboard.ts similarity index 100% rename from lib/src/useCopyToClipboard/useCopyToClipboard.ts rename to src/useCopyToClipboard/useCopyToClipboard.ts diff --git a/lib/src/useCountdown/index.ts b/src/useCountdown/index.ts similarity index 100% rename from lib/src/useCountdown/index.ts rename to src/useCountdown/index.ts diff --git a/lib/src/useCountdown/useCountdown.test.ts b/src/useCountdown/useCountdown.test.ts similarity index 100% rename from lib/src/useCountdown/useCountdown.test.ts rename to src/useCountdown/useCountdown.test.ts diff --git a/lib/src/useCountdown/useCountdown.ts b/src/useCountdown/useCountdown.ts similarity index 100% rename from lib/src/useCountdown/useCountdown.ts rename to src/useCountdown/useCountdown.ts diff --git a/lib/src/useCounter/index.ts b/src/useCounter/index.ts similarity index 100% rename from lib/src/useCounter/index.ts rename to src/useCounter/index.ts diff --git a/lib/src/useCounter/useCounter.test.ts b/src/useCounter/useCounter.test.ts similarity index 100% rename from lib/src/useCounter/useCounter.test.ts rename to src/useCounter/useCounter.test.ts diff --git a/lib/src/useCounter/useCounter.ts b/src/useCounter/useCounter.ts similarity index 100% rename from lib/src/useCounter/useCounter.ts rename to src/useCounter/useCounter.ts diff --git a/lib/src/useDarkMode/index.ts b/src/useDarkMode/index.ts similarity index 100% rename from lib/src/useDarkMode/index.ts rename to src/useDarkMode/index.ts diff --git a/lib/src/useDarkMode/useDarkMode.test.ts b/src/useDarkMode/useDarkMode.test.ts similarity index 100% rename from lib/src/useDarkMode/useDarkMode.test.ts rename to src/useDarkMode/useDarkMode.test.ts diff --git a/lib/src/useDarkMode/useDarkMode.ts b/src/useDarkMode/useDarkMode.ts similarity index 100% rename from lib/src/useDarkMode/useDarkMode.ts rename to src/useDarkMode/useDarkMode.ts diff --git a/lib/src/useDebounce/index.ts b/src/useDebounce/index.ts similarity index 100% rename from lib/src/useDebounce/index.ts rename to src/useDebounce/index.ts diff --git a/lib/src/useDebounce/useDebounce.test.ts b/src/useDebounce/useDebounce.test.ts similarity index 100% rename from lib/src/useDebounce/useDebounce.test.ts rename to src/useDebounce/useDebounce.test.ts diff --git a/lib/src/useDebounce/useDebounce.ts b/src/useDebounce/useDebounce.ts similarity index 100% rename from lib/src/useDebounce/useDebounce.ts rename to src/useDebounce/useDebounce.ts diff --git a/lib/src/useEffectOnce/index.ts b/src/useEffectOnce/index.ts similarity index 100% rename from lib/src/useEffectOnce/index.ts rename to src/useEffectOnce/index.ts diff --git a/lib/src/useEffectOnce/useEffectOnce.test.ts b/src/useEffectOnce/useEffectOnce.test.ts similarity index 100% rename from lib/src/useEffectOnce/useEffectOnce.test.ts rename to src/useEffectOnce/useEffectOnce.test.ts diff --git a/lib/src/useEffectOnce/useEffectOnce.ts b/src/useEffectOnce/useEffectOnce.ts similarity index 100% rename from lib/src/useEffectOnce/useEffectOnce.ts rename to src/useEffectOnce/useEffectOnce.ts diff --git a/lib/src/useElementSize/index.ts b/src/useElementSize/index.ts similarity index 100% rename from lib/src/useElementSize/index.ts rename to src/useElementSize/index.ts diff --git a/lib/src/useElementSize/useElementSize.test.ts b/src/useElementSize/useElementSize.test.ts similarity index 100% rename from lib/src/useElementSize/useElementSize.test.ts rename to src/useElementSize/useElementSize.test.ts diff --git a/lib/src/useElementSize/useElementSize.ts b/src/useElementSize/useElementSize.ts similarity index 100% rename from lib/src/useElementSize/useElementSize.ts rename to src/useElementSize/useElementSize.ts diff --git a/lib/src/useEventCallback/index.ts b/src/useEventCallback/index.ts similarity index 100% rename from lib/src/useEventCallback/index.ts rename to src/useEventCallback/index.ts diff --git a/lib/src/useEventCallback/useEventCallback.ts b/src/useEventCallback/useEventCallback.ts similarity index 100% rename from lib/src/useEventCallback/useEventCallback.ts rename to src/useEventCallback/useEventCallback.ts diff --git a/lib/src/useEventListener/index.ts b/src/useEventListener/index.ts similarity index 100% rename from lib/src/useEventListener/index.ts rename to src/useEventListener/index.ts diff --git a/lib/src/useEventListener/useEventListener.test.ts b/src/useEventListener/useEventListener.test.ts similarity index 100% rename from lib/src/useEventListener/useEventListener.test.ts rename to src/useEventListener/useEventListener.test.ts diff --git a/lib/src/useEventListener/useEventListener.ts b/src/useEventListener/useEventListener.ts similarity index 100% rename from lib/src/useEventListener/useEventListener.ts rename to src/useEventListener/useEventListener.ts diff --git a/lib/src/useFetch/index.ts b/src/useFetch/index.ts similarity index 100% rename from lib/src/useFetch/index.ts rename to src/useFetch/index.ts diff --git a/lib/src/useFetch/useFetch.ts b/src/useFetch/useFetch.ts similarity index 100% rename from lib/src/useFetch/useFetch.ts rename to src/useFetch/useFetch.ts diff --git a/lib/src/useHover/index.ts b/src/useHover/index.ts similarity index 100% rename from lib/src/useHover/index.ts rename to src/useHover/index.ts diff --git a/lib/src/useHover/useHover.test.ts b/src/useHover/useHover.test.ts similarity index 100% rename from lib/src/useHover/useHover.test.ts rename to src/useHover/useHover.test.ts diff --git a/lib/src/useHover/useHover.ts b/src/useHover/useHover.ts similarity index 100% rename from lib/src/useHover/useHover.ts rename to src/useHover/useHover.ts diff --git a/lib/src/useImageOnLoad/index.ts b/src/useImageOnLoad/index.ts similarity index 100% rename from lib/src/useImageOnLoad/index.ts rename to src/useImageOnLoad/index.ts diff --git a/lib/src/useImageOnLoad/useImageOnLoad.ts b/src/useImageOnLoad/useImageOnLoad.ts similarity index 100% rename from lib/src/useImageOnLoad/useImageOnLoad.ts rename to src/useImageOnLoad/useImageOnLoad.ts diff --git a/lib/src/useIntersectionObserver/index.ts b/src/useIntersectionObserver/index.ts similarity index 100% rename from lib/src/useIntersectionObserver/index.ts rename to src/useIntersectionObserver/index.ts diff --git a/lib/src/useIntersectionObserver/useIntersectionObserver.ts b/src/useIntersectionObserver/useIntersectionObserver.ts similarity index 100% rename from lib/src/useIntersectionObserver/useIntersectionObserver.ts rename to src/useIntersectionObserver/useIntersectionObserver.ts diff --git a/lib/src/useInterval/index.ts b/src/useInterval/index.ts similarity index 100% rename from lib/src/useInterval/index.ts rename to src/useInterval/index.ts diff --git a/lib/src/useInterval/useInterval.test.ts b/src/useInterval/useInterval.test.ts similarity index 100% rename from lib/src/useInterval/useInterval.test.ts rename to src/useInterval/useInterval.test.ts diff --git a/lib/src/useInterval/useInterval.ts b/src/useInterval/useInterval.ts similarity index 100% rename from lib/src/useInterval/useInterval.ts rename to src/useInterval/useInterval.ts diff --git a/lib/src/useIsClient/index.ts b/src/useIsClient/index.ts similarity index 100% rename from lib/src/useIsClient/index.ts rename to src/useIsClient/index.ts diff --git a/lib/src/useIsClient/useIsClient.test.ts b/src/useIsClient/useIsClient.test.ts similarity index 100% rename from lib/src/useIsClient/useIsClient.test.ts rename to src/useIsClient/useIsClient.test.ts diff --git a/lib/src/useIsClient/useIsClient.ts b/src/useIsClient/useIsClient.ts similarity index 100% rename from lib/src/useIsClient/useIsClient.ts rename to src/useIsClient/useIsClient.ts diff --git a/lib/src/useIsFirstRender/index.ts b/src/useIsFirstRender/index.ts similarity index 100% rename from lib/src/useIsFirstRender/index.ts rename to src/useIsFirstRender/index.ts diff --git a/lib/src/useIsFirstRender/useIsFirstRender.test.ts b/src/useIsFirstRender/useIsFirstRender.test.ts similarity index 100% rename from lib/src/useIsFirstRender/useIsFirstRender.test.ts rename to src/useIsFirstRender/useIsFirstRender.test.ts diff --git a/lib/src/useIsFirstRender/useIsFirstRender.ts b/src/useIsFirstRender/useIsFirstRender.ts similarity index 100% rename from lib/src/useIsFirstRender/useIsFirstRender.ts rename to src/useIsFirstRender/useIsFirstRender.ts diff --git a/lib/src/useIsMounted/index.ts b/src/useIsMounted/index.ts similarity index 100% rename from lib/src/useIsMounted/index.ts rename to src/useIsMounted/index.ts diff --git a/lib/src/useIsMounted/useIsMounted.test.ts b/src/useIsMounted/useIsMounted.test.ts similarity index 100% rename from lib/src/useIsMounted/useIsMounted.test.ts rename to src/useIsMounted/useIsMounted.test.ts diff --git a/lib/src/useIsMounted/useIsMounted.ts b/src/useIsMounted/useIsMounted.ts similarity index 100% rename from lib/src/useIsMounted/useIsMounted.ts rename to src/useIsMounted/useIsMounted.ts diff --git a/lib/src/useIsomorphicLayoutEffect/index.ts b/src/useIsomorphicLayoutEffect/index.ts similarity index 100% rename from lib/src/useIsomorphicLayoutEffect/index.ts rename to src/useIsomorphicLayoutEffect/index.ts diff --git a/lib/src/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts b/src/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts similarity index 100% rename from lib/src/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts rename to src/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts diff --git a/lib/src/useLocalStorage/index.ts b/src/useLocalStorage/index.ts similarity index 100% rename from lib/src/useLocalStorage/index.ts rename to src/useLocalStorage/index.ts diff --git a/lib/src/useLocalStorage/useLocalStorage.test.ts b/src/useLocalStorage/useLocalStorage.test.ts similarity index 100% rename from lib/src/useLocalStorage/useLocalStorage.test.ts rename to src/useLocalStorage/useLocalStorage.test.ts diff --git a/lib/src/useLocalStorage/useLocalStorage.ts b/src/useLocalStorage/useLocalStorage.ts similarity index 100% rename from lib/src/useLocalStorage/useLocalStorage.ts rename to src/useLocalStorage/useLocalStorage.ts diff --git a/lib/src/useLockedBody/index.ts b/src/useLockedBody/index.ts similarity index 100% rename from lib/src/useLockedBody/index.ts rename to src/useLockedBody/index.ts diff --git a/lib/src/useLockedBody/useLockedBody.ts b/src/useLockedBody/useLockedBody.ts similarity index 100% rename from lib/src/useLockedBody/useLockedBody.ts rename to src/useLockedBody/useLockedBody.ts diff --git a/lib/src/useMap/index.ts b/src/useMap/index.ts similarity index 100% rename from lib/src/useMap/index.ts rename to src/useMap/index.ts diff --git a/lib/src/useMap/useMap.test.ts b/src/useMap/useMap.test.ts similarity index 100% rename from lib/src/useMap/useMap.test.ts rename to src/useMap/useMap.test.ts diff --git a/lib/src/useMap/useMap.ts b/src/useMap/useMap.ts similarity index 100% rename from lib/src/useMap/useMap.ts rename to src/useMap/useMap.ts diff --git a/lib/src/useMediaQuery/index.ts b/src/useMediaQuery/index.ts similarity index 100% rename from lib/src/useMediaQuery/index.ts rename to src/useMediaQuery/index.ts diff --git a/lib/src/useMediaQuery/useMediaQuery.ts b/src/useMediaQuery/useMediaQuery.ts similarity index 100% rename from lib/src/useMediaQuery/useMediaQuery.ts rename to src/useMediaQuery/useMediaQuery.ts diff --git a/lib/src/useOnClickOutside/index.ts b/src/useOnClickOutside/index.ts similarity index 100% rename from lib/src/useOnClickOutside/index.ts rename to src/useOnClickOutside/index.ts diff --git a/lib/src/useOnClickOutside/useOnClickOutside.ts b/src/useOnClickOutside/useOnClickOutside.ts similarity index 100% rename from lib/src/useOnClickOutside/useOnClickOutside.ts rename to src/useOnClickOutside/useOnClickOutside.ts diff --git a/lib/src/useReadLocalStorage/index.ts b/src/useReadLocalStorage/index.ts similarity index 100% rename from lib/src/useReadLocalStorage/index.ts rename to src/useReadLocalStorage/index.ts diff --git a/lib/src/useReadLocalStorage/useReadLocalStorage.test.ts b/src/useReadLocalStorage/useReadLocalStorage.test.ts similarity index 100% rename from lib/src/useReadLocalStorage/useReadLocalStorage.test.ts rename to src/useReadLocalStorage/useReadLocalStorage.test.ts diff --git a/lib/src/useReadLocalStorage/useReadLocalStorage.ts b/src/useReadLocalStorage/useReadLocalStorage.ts similarity index 100% rename from lib/src/useReadLocalStorage/useReadLocalStorage.ts rename to src/useReadLocalStorage/useReadLocalStorage.ts diff --git a/lib/src/useScreen/index.ts b/src/useScreen/index.ts similarity index 100% rename from lib/src/useScreen/index.ts rename to src/useScreen/index.ts diff --git a/lib/src/useScreen/useScreen.ts b/src/useScreen/useScreen.ts similarity index 100% rename from lib/src/useScreen/useScreen.ts rename to src/useScreen/useScreen.ts diff --git a/lib/src/useScript/index.ts b/src/useScript/index.ts similarity index 100% rename from lib/src/useScript/index.ts rename to src/useScript/index.ts diff --git a/lib/src/useScript/useScript.ts b/src/useScript/useScript.ts similarity index 100% rename from lib/src/useScript/useScript.ts rename to src/useScript/useScript.ts diff --git a/lib/src/useSessionStorage/index.ts b/src/useSessionStorage/index.ts similarity index 100% rename from lib/src/useSessionStorage/index.ts rename to src/useSessionStorage/index.ts diff --git a/lib/src/useSessionStorage/useSessionStorage.test.ts b/src/useSessionStorage/useSessionStorage.test.ts similarity index 100% rename from lib/src/useSessionStorage/useSessionStorage.test.ts rename to src/useSessionStorage/useSessionStorage.test.ts diff --git a/lib/src/useSessionStorage/useSessionStorage.ts b/src/useSessionStorage/useSessionStorage.ts similarity index 100% rename from lib/src/useSessionStorage/useSessionStorage.ts rename to src/useSessionStorage/useSessionStorage.ts diff --git a/lib/src/useSsr/index.ts b/src/useSsr/index.ts similarity index 100% rename from lib/src/useSsr/index.ts rename to src/useSsr/index.ts diff --git a/lib/src/useSsr/useSsr.ts b/src/useSsr/useSsr.ts similarity index 100% rename from lib/src/useSsr/useSsr.ts rename to src/useSsr/useSsr.ts diff --git a/lib/src/useStep/index.ts b/src/useStep/index.ts similarity index 100% rename from lib/src/useStep/index.ts rename to src/useStep/index.ts diff --git a/lib/src/useStep/useStep.test.ts b/src/useStep/useStep.test.ts similarity index 100% rename from lib/src/useStep/useStep.test.ts rename to src/useStep/useStep.test.ts diff --git a/lib/src/useStep/useStep.ts b/src/useStep/useStep.ts similarity index 100% rename from lib/src/useStep/useStep.ts rename to src/useStep/useStep.ts diff --git a/lib/src/useTernaryDarkMode/index.ts b/src/useTernaryDarkMode/index.ts similarity index 100% rename from lib/src/useTernaryDarkMode/index.ts rename to src/useTernaryDarkMode/index.ts diff --git a/lib/src/useTernaryDarkMode/useTernaryDarkMode.ts b/src/useTernaryDarkMode/useTernaryDarkMode.ts similarity index 100% rename from lib/src/useTernaryDarkMode/useTernaryDarkMode.ts rename to src/useTernaryDarkMode/useTernaryDarkMode.ts diff --git a/lib/src/useTimeout/index.ts b/src/useTimeout/index.ts similarity index 100% rename from lib/src/useTimeout/index.ts rename to src/useTimeout/index.ts diff --git a/lib/src/useTimeout/useTimeout.test.ts b/src/useTimeout/useTimeout.test.ts similarity index 100% rename from lib/src/useTimeout/useTimeout.test.ts rename to src/useTimeout/useTimeout.test.ts diff --git a/lib/src/useTimeout/useTimeout.ts b/src/useTimeout/useTimeout.ts similarity index 100% rename from lib/src/useTimeout/useTimeout.ts rename to src/useTimeout/useTimeout.ts diff --git a/lib/src/useUpdateEffect/index.ts b/src/useUpdateEffect/index.ts similarity index 100% rename from lib/src/useUpdateEffect/index.ts rename to src/useUpdateEffect/index.ts diff --git a/lib/src/useUpdateEffect/useUpdateEffect.test.ts b/src/useUpdateEffect/useUpdateEffect.test.ts similarity index 100% rename from lib/src/useUpdateEffect/useUpdateEffect.test.ts rename to src/useUpdateEffect/useUpdateEffect.test.ts diff --git a/lib/src/useUpdateEffect/useUpdateEffect.ts b/src/useUpdateEffect/useUpdateEffect.ts similarity index 100% rename from lib/src/useUpdateEffect/useUpdateEffect.ts rename to src/useUpdateEffect/useUpdateEffect.ts diff --git a/lib/src/useWindowSize/index.ts b/src/useWindowSize/index.ts similarity index 100% rename from lib/src/useWindowSize/index.ts rename to src/useWindowSize/index.ts diff --git a/lib/src/useWindowSize/useWindowSize.test.ts b/src/useWindowSize/useWindowSize.test.ts similarity index 100% rename from lib/src/useWindowSize/useWindowSize.test.ts rename to src/useWindowSize/useWindowSize.test.ts diff --git a/lib/src/useWindowSize/useWindowSize.ts b/src/useWindowSize/useWindowSize.ts similarity index 100% rename from lib/src/useWindowSize/useWindowSize.ts rename to src/useWindowSize/useWindowSize.ts diff --git a/lib/tsconfig.build.json b/tsconfig.build.json similarity index 88% rename from lib/tsconfig.build.json rename to tsconfig.build.json index 85240e3a..72c7d352 100644 --- a/lib/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "./tsconfig.base.json", "compilerOptions": { "rootDir": "./src", diff --git a/tsconfig.json b/tsconfig.json index 39ad9699..e53e79b5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,9 +4,11 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "lib": ["lib/src"], + "lib": ["src"], "site": ["site/src"] }, "noEmit": true - } + }, + + "include": ["src/**/*"] }