Skip to content

Commit 345b5a0

Browse files
committed
chore(docs): add intro to readme and add extra script
1 parent f9d157f commit 345b5a0

File tree

2 files changed

+40
-7
lines changed

2 files changed

+40
-7
lines changed

README.md

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,61 @@
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
```

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
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",

0 commit comments

Comments
 (0)