Skip to content

Commit

Permalink
Exclude story files from build
Browse files Browse the repository at this point in the history
  • Loading branch information
leroykorterink committed Oct 6, 2023
1 parent bd8b322 commit 9999c4d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/* eslint-disable no-console */
import { useAnimation } from '@mediamonks/react-animation';
import { type Meta, type StoryObj } from '@storybook/react';
import { type Meta } from '@storybook/react';
import gsap from 'gsap';
import { useCallback, useEffect, useRef, useState, type ReactElement, Fragment } from 'react';
import { useBeforeUnmount } from '../useBeforeUnmount/useBeforeUnmount.js';
import { TransitionPresence } from './TransitionPresence.js';

export default {
const meta = {
title: 'components/TransitionPresence',
component: TransitionPresence,
} as Meta<typeof TransitionPresence>;
} satisfies Meta;

export default meta;

type ChildProps = {
background: string;
Expand Down Expand Up @@ -106,7 +107,7 @@ export const Demo = {
</>
);
},
} satisfies StoryObj<typeof TransitionPresence>;
};

export const DemoUsingFragment = {
render(): ReactElement {
Expand Down Expand Up @@ -218,7 +219,6 @@ export const DemoClickToHide = {
/>
) : null}
</TransitionPresence>

<div style={{ marginTop: 24 }}>Click the square (isVisible: {String(isVisible)})</div>
</>
);
Expand Down
10 changes: 9 additions & 1 deletion packages/react-transition-presence/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@
"declaration": true,
"outDir": "./dist"
},
"exclude": ["**/*.test.ts", "**/*.test.tsx", "jest.config.ts"]
"include": ["./src/**/*"],
"exclude": [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.stories.tsx",
"**/*.stories.ts",
"**/*.playwright.tsx",
"**/*.playwright.ts"
]
}
3 changes: 2 additions & 1 deletion packages/react-transition-presence/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"jsx": "react-jsx",
"moduleResolution": "NodeNext"
"moduleResolution": "NodeNext",
"types": ["jest"]
}
}

0 comments on commit 9999c4d

Please sign in to comment.