Skip to content

Commit

Permalink
build: add use client banner to all modules
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdyman committed Sep 1, 2023
1 parent f879765 commit 9791cd3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

## Demo

- Storybook: [docs](https://react-compare-slider.vercel.app/?path=/docs/docs-introduction--page), [demos](https://react-compare-slider.vercel.app/?path=/story/demos), [recipies](https://react-compare-slider.vercel.app/?path=/story/recipies)
- Storybook: [docs](https://react-compare-slider.vercel.app/?path=/docs/docs-introduction--page), [demos](https://react-compare-slider.vercel.app/?path=/story/demos), [custom recipies](https://react-compare-slider.vercel.app/?path=/story/recipies), [custom handles](https://react-compare-slider.vercel.app/?path=/story/handles)
- CodeSandbox: [basic demo](https://codesandbox.io/p/sandbox/github/nerdyman/react-compare-slider/tree/main/docs/example?file=/src/App.tsx:1,1)
- [Local example](./docs/example)

Expand Down Expand Up @@ -94,7 +94,7 @@ See the [Images docs](https://react-compare-slider.vercel.app/?path=/docs/docs-i
| [`position`](https://react-compare-slider.vercel.app/?path=/story/demos--position) | `number` | | `50` | Initial percentage position of divide (`0-100`). |
| [`transition`](https://react-compare-slider.vercel.app/?path=/story/demos--transition) | `string` | | `undefined` | Shorthand CSS `transition` properties to apply to handle movement. |

See the [API docs](https://react-compare-slider.vercel.app/?path=/docs/docs-api--page) for more information.
[API docs](https://react-compare-slider.vercel.app/?path=/docs/docs-api--page) for more information.

<br />

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"dx": "npm run bootstrap",
"start": "pnpm run dev",
"build": "pnpm run check:types && NODE_ENV=production tsup",
"release": "pnpm run lint && pnpm run test && pnpm run build && pnpm run check && np --no-2fa",
"release": "pnpm run lint && pnpm run test && pnpm run build && pnpm run check && np --no-tests --no-cleanup",
"test": "rm -rf coverage && concurrently -n \"ssr,sb\" -c \"magenta,blue\" \"pnpm run test:ssr\" \"pnpm run test:storybook\"",
"test:ci": "concurrently -k -s first -n \"sb,test\" -c \"magenta,blue\" \"pnpm run --filter @this/storybook storybook:build --quiet && pnpm sirv ./docs/storybook/storybook-static --host 127.0.0.1 --port 6006\" \"pnpm wait-port 6006 && pnpm run test\"",
"test:ssr": "pnpm c8 -o ./coverage/ssr-tests -r text -r lcov node --test ./docs/ssr-tests/ssr.test.mjs",
Expand Down
7 changes: 6 additions & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export default defineConfig((options) => ({
splitting: true,
treeshake: true,
// Storybook docgen won't work with files sourced from outside of its root directory, so we need
// to copy the built module into the docs folder.
// to copy the module source into the docs folder.
onSuccess: 'cp -r src ./docs/storybook',
esbuildOptions(esBuildOptions) {
esBuildOptions.banner = {
js: '"use client"',
};
},
}));

0 comments on commit 9791cd3

Please sign in to comment.