File tree Expand file tree Collapse file tree 2 files changed +40
-7
lines changed
Expand file tree Collapse file tree 2 files changed +40
-7
lines changed Original file line number Diff line number Diff line change 11# tsdown-react-tailwind-template
22
3- A starter for creating a React component library.
3+ This is a template for building React component libraries that are styled with TailwindCSS and bundled with tsdown. For
4+ more information on the tooling, or to follow a guide on setting this up yourself, check out
5+ my [ article] ( https://bosher.co.nz ) .
6+
7+ ## Features
8+
9+ - React 19
10+ - Fast and tiny builds thanks to tsdown
11+ - Optional Preact branch
12+ - TailwindCSS 4
13+ - Optional DaisyUI branch
14+ - ESLint and prettier pre-configured
15+ - Vitest for unit tests
16+ - GitHub actions for testing and releasing
17+
18+ ## Using this template
19+
20+ To use this template, click the "Use this template" button above, or run the following command:
21+
22+ ``` bash
23+ pnpm dlx degit bosh-code/tsdown-react-tailwind-template my-react-library
24+ cd my-react-library
25+
26+ # or for Preact, etc...
27+ pnpm dlx degit bosh-code/tsdown-react-tailwind-template#templates/preact my-preact-library
28+ cd my-preact-library
29+ ```
430
531## Development
632
733- Install dependencies:
834
935``` bash
10- npm install
36+ pnpm install
1137```
1238
1339- Run the playground:
1440
1541``` bash
16- npm run playground
42+ pnpm playground
1743```
1844
19- - Run the unit tests :
45+ - Build the library :
2046
2147``` bash
22- npm run test
48+ pnpm build
2349```
2450
25- - Build the library:
51+ - Build in watch mode:
52+
53+ ``` bash
54+ pnpm dev
55+ ```
56+
57+ - Run the unit tests:
2658
2759``` bash
28- npm run build
60+ pnpm test
2961```
Original file line number Diff line number Diff line change 3333 "scripts" : {
3434 "build" : " tsdown" ,
3535 "build:prod" : " NODE_ENV=prod tsdown" ,
36+ "build:debug" : " tsdown --no-treeshake" ,
3637 "dev" : " tsdown --watch" ,
3738 "lint" : " eslint ." ,
3839 "playground" : " vite --config playground/vite.config.ts" ,
You can’t perform that action at this time.
0 commit comments