Skip to content

Commit 1ea1314

Browse files
committed
Remove the "poll" option on the watch command
which was never supported in Tailwind v4 (only v3). Closes #580
1 parent db7c010 commit 1ea1314

File tree

5 files changed

+10
-22
lines changed

5 files changed

+10
-22
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## next / unreleased
44

5+
### Changed
6+
7+
* Removed the "poll" option on the watch command, since Tailwind v4 dropped support for this option (and it has been a no-op in this gem since.) #580 @flavorjones
8+
9+
510
### Improved
611

712
* Support Rails 8.1 scaffolding which disables system tests by default. #585 @flavorjones

README.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,13 @@ Synopsis:
262262
- `bin/rails tailwindcss:install` - installs the configuration file, output file, and `Procfile.dev`
263263
- `bin/rails tailwindcss:build` - generate the output file
264264
- `bin/rails tailwindcss:build[debug]` - generate unminimized output
265+
- `bin/rails tailwindcss:build[verbose]` - emit the commands being run
265266
- `bin/rails tailwindcss:watch` - start live rebuilds, generating output on file changes
266267
- `bin/rails tailwindcss:watch[debug]` - generate unminimized output
267-
- `bin/rails tailwindcss:watch[poll]` - for systems without file system events
268268
- `bin/rails tailwindcss:watch[always]` - for systems without TTY (e.g., some docker containers)
269+
- `bin/rails tailwindcss:watch[verbose]` - emit the commands being run
269270
270-
Note that you can combine task options, e.g. `rails tailwindcss:watch[debug,poll]`.
271+
Note that you can combine task options, e.g. `rails tailwindcss:watch[debug,always]`.
271272
272273
This gem also makes available a Puma plugin to manage a live rebuild process when you run `rails server` (see "Live Rebuild" section below).
273274
@@ -312,14 +313,6 @@ and then running `rails server` (or just `puma`) will run the Tailwind watch pro
312313
313314
This is a flexible command, which can be run with a few different options.
314315
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-
323316
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.
324317
325318
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`.

lib/tailwindcss/commands.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ def compile_command(debug: false, **kwargs)
2121
command
2222
end
2323

24-
def watch_command(always: false, poll: false, **kwargs)
24+
def watch_command(always: false, **kwargs)
2525
compile_command(**kwargs).tap do |command|
2626
command << "-w"
2727
command << "always" if always
28-
command << "-p" if poll
2928
end
3029
end
3130

lib/tasks/build.rake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ namespace :tailwindcss do
1414
desc "Watch and build your Tailwind CSS on file changes"
1515
task watch: [:environment, :engines] do |_, args|
1616
debug = args.extras.include?("debug")
17-
poll = args.extras.include?("poll")
1817
always = args.extras.include?("always")
1918
verbose = args.extras.include?("verbose")
2019

21-
command = Tailwindcss::Commands.watch_command(always: always, debug: debug, poll: poll)
20+
command = Tailwindcss::Commands.watch_command(always: always, debug: debug)
2221
env = Tailwindcss::Commands.command_env(verbose: verbose)
2322
puts "Running: #{Shellwords.join(command)}" if verbose
2423

test/lib/tailwindcss/commands_test.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,6 @@ def setup
111111
refute_includes(actual, "-p")
112112
refute_includes(actual, "--minify")
113113

114-
actual = Tailwindcss::Commands.watch_command(poll: true)
115-
assert_kind_of(Array, actual)
116-
assert_equal(executable, actual.first)
117-
assert_includes(actual, "-w")
118-
refute_includes(actual, "always")
119-
assert_includes(actual, "-p")
120-
assert_includes(actual, "--minify")
121-
122114
actual = Tailwindcss::Commands.watch_command(always: true)
123115
assert_kind_of(Array, actual)
124116
assert_equal(executable, actual.first)

0 commit comments

Comments
 (0)