|
1 | 1 | # Tailwind CSS for Rails |
2 | 2 |
|
3 | | -[Tailwind CSS](https://tailwindcss.com) is a utility-first CSS framework packed with classes like flex, pt-4, text-center and rotate-90 that can be composed to build any design, directly in your markup. |
| 3 | +[Tailwind CSS](https://tailwindcss.com) is a utility-first CSS framework packed with classes like `flex`, `pt-4`, `text-center` and `rotate-90` that can be composed to build any design, directly in your markup. |
| 4 | + |
| 5 | +> [!NOTE] |
| 6 | +> This document is specific to Tailwind v4, corresponding to v4 of this gem. If you are looking for documentation for v3, please visit to the [tailwindcss-rails v3 |
| 7 | +README](https://github.com/rails/tailwindcss-rails/tree/v3-stable?tab=readme-ov-file). |
4 | 8 |
|
5 | 9 | <!-- regenerate TOC with `rake format:toc` --> |
6 | 10 |
|
@@ -262,12 +266,13 @@ Synopsis: |
262 | 266 | - `bin/rails tailwindcss:install` - installs the configuration file, output file, and `Procfile.dev` |
263 | 267 | - `bin/rails tailwindcss:build` - generate the output file |
264 | 268 | - `bin/rails tailwindcss:build[debug]` - generate unminimized output |
| 269 | + - `bin/rails tailwindcss:build[verbose]` - emit the commands being run |
265 | 270 | - `bin/rails tailwindcss:watch` - start live rebuilds, generating output on file changes |
266 | 271 | - `bin/rails tailwindcss:watch[debug]` - generate unminimized output |
267 | | - - `bin/rails tailwindcss:watch[poll]` - for systems without file system events |
268 | 272 | - `bin/rails tailwindcss:watch[always]` - for systems without TTY (e.g., some docker containers) |
| 273 | + - `bin/rails tailwindcss:watch[verbose]` - emit the commands being run |
269 | 274 |
|
270 | | -Note that you can combine task options, e.g. `rails tailwindcss:watch[debug,poll]`. |
| 275 | +Note that you can combine task options, e.g. `rails tailwindcss:watch[debug,always]`. |
271 | 276 |
|
272 | 277 | This gem also makes available a Puma plugin to manage a live rebuild process when you run `rails server` (see "Live Rebuild" section below). |
273 | 278 |
|
@@ -312,14 +317,6 @@ and then running `rails server` (or just `puma`) will run the Tailwind watch pro |
312 | 317 |
|
313 | 318 | This is a flexible command, which can be run with a few different options. |
314 | 319 |
|
315 | | -If you are running `rails tailwindcss:watch` on a system that doesn't fully support file system events, pass a `poll` argument to the task to instruct tailwindcss to instead use polling: |
316 | | -
|
317 | | -``` |
318 | | -rails tailwindcss:watch[poll] |
319 | | -``` |
320 | | -
|
321 | | -(If you use `bin/dev` then you should modify your `Procfile.dev` to use the `poll` option.) |
322 | | -
|
323 | 320 | If you are running `rails tailwindcss:watch` as a process in a Docker container, set `tty: true` in `docker-compose.yml` for the appropriate container to keep the watch process running. |
324 | 321 |
|
325 | 322 | If you are running `rails tailwindcss:watch` in a docker container without a tty, pass the `always` argument to the task to instruct tailwindcss to keep the watcher alive even when `stdin` is closed: `rails tailwindcss:watch[always]`. If you use `bin/dev` then you should modify your `Procfile.dev`. |
|
0 commit comments