A template generator that automatically configures the latest Tailwind CSS
version for you. Vite
is used for most of the templates. See available templates below.
NOTE: If you are using npm
to install a template, make sure to have v7.x
(do npm -v
to check version)
$ cd <your_directory>
$ npx twpx
$ npx twpx
$ npx twpx my-project -t vanilla
**NOTE:** Some terminals like `git bash` will not work with the interactive installation, use the direct installation instead.
---
## How It Works
- For example, you named your project `hello-world` with `react-ts` template and `yarn`. The generator will execute:
```js
$ yarn create vite hello-world --template react-ts
$ cd hello-world
$ yarn add -D tailwindcss@latest postcss@latest autoprefixer@latest
@tailwind base;
@tailwind components;
@tailwind utilities;
Templates | TypeScript Templates |
---|---|
vanilla |
vanilla-ts |
react |
react-ts |
preact |
preact-ts |
next |
next-ts |
dev
branch.To test locally, run:
$ cd <your_cloned_fork>
# then
$ ts-node main
# or
$ yarn build
$ node lib/main
This repository is licensed under the MIT License.