Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tzsk/twify

A Tool to Setup TailwindCSS With a Single Command
https://github.com/tzsk/twify

angular create-react-app laravel nextjs nuxt3 nuxtjs sveltekit tailwind tailwindcss vite vue

Last synced: about 2 months ago
JSON representation

A Tool to Setup TailwindCSS With a Single Command

Awesome Lists containing this project

README

        


Logo Twify


Build Status
Total Downloads
Latest Stable Version
Language



A simple tool to setup Tailwind CSS in your fresh project with a Single Command.

![Twify](./assets/twify.png)

## :rocket: New Project

Scaffold a new project of your choice of framework, with tailwindcss

```sh
npx twify@latest create vite

# Or with preferred package Manager
# Yarn
npx twify@latest yarn create vite
# PNPM
npx twify@latest pnpm create vite
```

Above the project that is specified is `vite`. You can choose any of the following.

**Project Usage**:

Below commands will install the `@latest` versions of the respective frameworks.

| **Framework** | **Command** |
| ---------------- | ------------------------------------------ |
| Next 13 | `npx twify@latest create next ` |
| Remix | `npx twify@latest create remix ` |
| Nuxt 2 | `npx twify@latest create nuxt ` |
| Nuxt 3 | `npx twify@latest create nuxt3 ` |
| Svelte Kit | `npx twify@latest create svelte ` |
| Laravel Vite | `npx twify@latest create laravel ` |
| Vite | `npx twify@latest create vite ` |
| Solid Start | `npx twify@latest create solid ` |
| Angular | `npx twify@latest create angular ` |
| Create React App | `npx twify@latest create react ` |

You can pass all the framework specific flags as well like the following,

```sh
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.

## :gift: Existing Project

You can also configure existing project with tailwindcss.

```sh
npx twify@latest init
```

### Command Options

Other than `--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.

```sh
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.

```sh
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.

```sh
npx twify init -p
# OR
npx twify init --pretty
```

## :star: Supported Projects

Below are the list of Supported Projects,

| **Framework** | **Javascript** | **Typescript** |
| ---------------- | ------------------ | ------------------ |
| Next 13 | :white_check_mark: | :white_check_mark: |
| Remix | :white_check_mark: | :white_check_mark: |
| Nuxt 2 | :white_check_mark: | :white_check_mark: |
| Nuxt 3 | :white_check_mark: | :white_check_mark: |
| Svelte Kit | :white_check_mark: | :white_check_mark: |
| Laravel Vite | :white_check_mark: | :white_check_mark: |
| Vite | :white_check_mark: | :white_check_mark: |
| Angular | :white_check_mark: | :white_check_mark: |
| Create React App | :white_check_mark: | :white_check_mark: |
| Solid JS | :white_check_mark: | :white_check_mark: |
| Astro | :o: WIP | :o: WIP |
| Qwik | :o: WIP | :o: WIP |

## :microscope: Testing

After Cloning the repository, install all npm dependencies by running: `npm install`.

Then Run Tests:

```bash
$ npm run test
$ npm run coverage
```

## :date: Change log

Please see [release history][link-releases] for more information on what has changed recently.

## :heart: Contributing

Please feel free to contribute ideas and PRs are most welcome.

## :crown: Credits

- [Kazi Mainuddin Ahmed][link-author]
- [All Contributors][link-contributors]

## :policeman: License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[link-author]: https://github.com/tzsk
[link-contributors]: ../../contributors
[link-releases]: ../../releases