A simple tool to setup Tailwind CSS in your fresh project with a Single Command.
🚀 New Project
Scaffold a new project of your choice of framework, with tailwindcss
npx twify@latest create vite <my-app-directory> # Or with preferred package Manager # Yarn npx twify@latest yarn create vite <my-app-directory> # PNPM npx twify@latest pnpm create vite <my-app-directory>
Above the project that is specified is
vite. You can choose any of the following.
Below commands will install the
@latest versions of the respective frameworks.
|Create React App||
You can pass all the framework specific flags as well like the following,
npx twify@latest pnpm create vite my-vite-app --template vue-ts
Above will create a new project with the vite vue typescript project with the
pnpm package manager and it will be configured with Tailwind CSS.
🎁 Existing Project
You can also configure existing project with tailwindcss.
npx twify@latest init
--help you can also do more.
Keep Existing CSS
By default, twify will replace your existing CSS and only keep Tailwind. But if you want to keep the existing CSS you can use the
-k, --keep flag.
npx twify init -k # OR npx twify init --keep
Force Package Manager for Installation
By default, twify will try to guess the Package Manager for installing dependencies in your project but if you want to force your standard or you don't want to take any chances you can use the
-i, --installer option.
npx twify init -i yarn # Options: npm, yarn, pnpm # OR npx twify init --installer yarn
Configure Tailwind Prettier
Optionally if you want to install the Tailwind Prettier Plugin also, you can opt for
-p, --pretty flag. Because this plugin doesn't play well with other prettier plugins it is kept under the flag not a default.
npx twify init -p # OR npx twify init --pretty
⭐ Supported Projects
Below are the list of Supported Projects,
|Create React App|
After Cloning the repository, install all npm dependencies by running:
Then Run Tests:
$ npm run test $ npm run coverage
📅 Change log
Please see release history for more information on what has changed recently.
Please feel free to contribute ideas and PRs are most welcome.
The MIT License (MIT). Please see License File for more information.