TypeScript templates I use to immediately start doing something, with opinionated configuration.
Download zip / tar.xz files from Github releases. Each file contains 1 variant.
Based on create-next-app template.
Plugins:
- A hand-roll alternative to next-compose-plugins
- next-bundle-analyzer
Libraries:
- trpc for typed API
- tailwindcss
- No CSS or UI libraries. User can freely bring own UI libraries.
- util libraries: clsx foxact lodash-es @jokester/ts-commonutil
Not configured for serverless or SSG, I don't use Next.js for them.
based on create-vite template
Libraries:
If you need to host built assets with path rewriting,
I recommend hono-worker
variant,
or serve-handler (example).
- based on hono
- Capable of hosting SPA created by
vite-preact
- Can be used for any purpose, a new library or CLI or else.
All the variants contains a similar set of configurations and npm scripts:
tsconfig.json
jest
/ts-jest
for testinggts
prettier
eslint
for linting and formattingnpm dev
npm typecheck
/npm typecheck:watch
npm lint
/npm lint:fix
npm test
/npm test:watch
/npm test:coverage
npm build
/npm analyze
The principles behind current (opinionated) settings are:
- Be strict as possible in TypeScript.
- Be close to upstream defaults, but with some opinionated changes
obsolete/web-gatsby
obsolete/craco-react
obsolete/aws-api-gateway
obsolete/mobile-react-native
obsolete/web-tsup
- Browser-only React SPA with egoist/tsup
- work from upstream repositories follows their licenses
- other contents are MIT licensed
- other contents are WTFPL licensed too