-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Combine sources and tests directories (#94)
* tests: move tests under the src directory for comfort reasons * build: fix typescript configs During recent directories change it could suck tests directory, now it only consists of stuff exported in `src/index.ts` * test: bring back misc tests * ci: test linting issues * docs: move docs near the sources fix: #89 * docs: update CONTRIBUTING.md * feat: add script that help[s to create hook files Said file creates valid files and directories structure, handy when creating new hooks. * docs: annotation about hook create script
- Loading branch information
Showing
128 changed files
with
648 additions
and
686 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<link rel='shortcut icon' href='/favicon.ico'> | ||
<link rel='icon' type='image/png' href='/storybook.png' sizes='60x60'> | ||
<link rel='shortcut icon' href='./favicon.ico'> | ||
<link rel='icon' type='image/png' href='./storybook.png' sizes='60x60'> | ||
<link rel="preconnect" href="https://fonts.gstatic.com"> | ||
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;700;800&display=swap" rel="stylesheet"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,46 @@ | ||
// Callback | ||
export { useDebounceCallback } from './useDebounceCallback'; | ||
export { useRafCallback } from './useRafCallback'; | ||
export { useDebounceCallback } from './useDebounceCallback/useDebounceCallback'; | ||
export { useRafCallback } from './useRafCallback/useRafCallback'; | ||
|
||
// Livecycle | ||
export { useConditionalEffect, IUseConditionalEffectPredicate } from './useConditionalEffect'; | ||
export { | ||
useConditionalEffect, | ||
IUseConditionalEffectPredicate, | ||
} from './useConditionalEffect/useConditionalEffect'; | ||
export { | ||
useConditionalUpdateEffect, | ||
IUseConditionalUpdateEffectPredicate, | ||
} from './useConditionalUpdateEffect'; | ||
export { useFirstMountState } from './useFirstMountState'; | ||
export { useIsMounted } from './useIsMounted'; | ||
export { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'; | ||
export { useMountEffect } from './useMountEffect'; | ||
export { useRerender } from './useRerender'; | ||
export { useUnmountEffect } from './useUnmountEffect'; | ||
export { useUpdateEffect } from './useUpdateEffect'; | ||
} from './useConditionalUpdateEffect/useConditionalUpdateEffect'; | ||
export { useFirstMountState } from './useFirstMountState/useFirstMountState'; | ||
export { useIsMounted } from './useIsMounted/useIsMounted'; | ||
export { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect/useIsomorphicLayoutEffect'; | ||
export { useMountEffect } from './useMountEffect/useMountEffect'; | ||
export { useRerender } from './useRerender/useRerender'; | ||
export { useUnmountEffect } from './useUnmountEffect/useUnmountEffect'; | ||
export { useUpdateEffect } from './useUpdateEffect/useUpdateEffect'; | ||
|
||
// State | ||
export { useMediatedState } from './useMediatedState'; | ||
export { usePrevious } from './usePrevious'; | ||
export { useSafeState } from './useSafeState'; | ||
export { useToggle } from './useToggle'; | ||
export { useMediatedState } from './useMediatedState/useMediatedState'; | ||
export { usePrevious } from './usePrevious/usePrevious'; | ||
export { useSafeState } from './useSafeState/useSafeState'; | ||
export { useToggle } from './useToggle/useToggle'; | ||
|
||
// Navogator | ||
export { useNetworkState } from './useNetworkState'; | ||
// Navigator | ||
export { useNetworkState } from './useNetworkState/useNetworkState'; | ||
|
||
// Miscellaneous | ||
export { useSyncedRef } from './useSyncedRef'; | ||
export { useSyncedRef } from './useSyncedRef/useSyncedRef'; | ||
|
||
// SideEffect | ||
export { useLocalStorageValue } from './useLocalStorageValue'; | ||
export { useSessionStorageValue } from './useSessionStorageValue'; | ||
export { useLocalStorageValue } from './useLocalStorageValue/useLocalStorageValue'; | ||
export { useSessionStorageValue } from './useSessionStorageValue/useSessionStorageValue'; | ||
|
||
// Sensor | ||
export { useResizeObserver, IUseResizeObserverCallback } from './useResizeObserver'; | ||
export { | ||
useResizeObserver, | ||
IUseResizeObserverCallback, | ||
} from './useResizeObserver/useResizeObserver'; | ||
export { useMeasure } from './useMeasure/useMeasure'; | ||
|
||
// Dom | ||
export { useDocumentTitle, IUseDocumentTitleOptions } from './useDocumentTitle'; | ||
export { useDocumentTitle, IUseDocumentTitleOptions } from './useDocumentTitle/useDocumentTitle'; |
2 changes: 1 addition & 1 deletion
2
...ifecycle/useConditionalEffect.stories.tsx → ...useConditionalEffect/__docs__/example.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../Lifecycle/useConditionalEffect.story.mdx → src/useConditionalEffect/__docs__/story.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/dom/useConditionalEffect.test.ts → src/useConditionalEffect/__tests__/dom.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/ssr/useConditionalEffect.test.ts → src/useConditionalEffect/__tests__/ssr.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/useConditionalEffect.ts → ...ConditionalEffect/useConditionalEffect.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...le/useConditionalUpdateEffect.stories.tsx → ...ditionalUpdateEffect/__docs__/example.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ycle/useConditionalUpdateEffect.story.mdx → ...onditionalUpdateEffect/__docs__/story.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/dom/useConditionalUpdateEffect.test.ts → ...eConditionalUpdateEffect/__tests__/dom.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/ssr/useConditionalUpdateEffect.test.ts → ...eConditionalUpdateEffect/__tests__/ssr.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/useConditionalUpdateEffect.ts → ...pdateEffect/useConditionalUpdateEffect.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../Callback/useDebounceCallback.stories.tsx → src/useDebounceCallback/__docs__/example.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...es/Callback/useDebounceCallback.story.mdx → src/useDebounceCallback/__docs__/story.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/dom/useDebounceCallback.test.ts → src/useDebounceCallback/__tests__/dom.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/ssr/useDebounceCallback.test.ts → src/useDebounceCallback/__tests__/ssr.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
stories/Dom/useDocumentTitle.stories.tsx → src/useDocumentTitle/__docs__/example.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
stories/Dom/useDocumentTitle.story.mdx → src/useDocumentTitle/__docs__/story.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/dom/useDocumentTitle.test.ts → src/useDocumentTitle/__tests__/dom.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/ssr/useDocumentTitle.test.ts → src/useDocumentTitle/__tests__/ssr.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/useDocumentTitle.ts → src/useDocumentTitle/useDocumentTitle.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../Lifecycle/useFirstMountState.stories.tsx → src/useFirstMountState/__docs__/example.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.