Inspired by ts-lib-starter.
You can use this template to bootstrap a custom hook library、custom component library.
- Change directory
packages/ts-react-lib
with your own lib name - Search
ts-react-lib
and replace it with your custom package name.
If you perfer downloading this template without .git
folder, you can use degit:
npm i degit -g
degit https://github.com/mysteryven/ts-react-lib-starter-monorepo.git
pagckages/ts-react-lib/shim.js
is used to auto import react. Feel free to delete other files in src
but not shim.js
. If you want to change its directory or its name, make sure also change its path in tsup.config.ts
inject: ['path/to/shim.js']
- Manange packages with pnpm
- Bundle with tsup
- Test with vitest
- Add demos to show use-case in
packages/playground
When you push code to Github on branch main
, It will run test by CI (GitHub action). To skip CI, add skip-ci
to commit message.