-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--watch doesn't work in background #9870
Comments
Hey, I've added a I've verified this on my end that it seems to work. Please let me know if you encounter any more issues. Thanks! ✨ |
Are prebuilt standalone binaries distributed for the insider version? I'm not going to use npm. |
I was running the tailwindcss standalone cli binary on a watch from inside a Gradle task - the |
This is inconsistent for me with zsh, but nohup seems to be an okay workaround: nohup npx tailwindcss -i ./input.css -o ./output.css --watch=always </dev/null &
# Optional: capture an id and send the kill signal when finished
tid=$!
kill -9 $tid |
Can we make this the default behavior or error if it gets an immediate EOF or something? If it starts in a non-interactive shell, ending immediately can not be the desired behavior. This cost me several hours of debugging trying to figure out why it wasn't giving output, wasn't updating, wasn't erroring, but worked just fine when I ran it manually. This isn't in the help output either. Usage:
tailwindcss [--input input.css] [--output output.css] [--watch] [options...]
tailwindcss init [--full] [--postcss] [options...]
Commands:
init [options]
Options:
-i, --input Input file
-o, --output Output file
-w, --watch Watch for changes and rebuild as needed
-p, --poll Use polling instead of filesystem events when watching
--content Content paths to use for removing unused classes
--postcss Load custom PostCSS configuration
-m, --minify Minify the output
-c, --config Path to a custom config file
--no-autoprefixer Disable autoprefixer
-h, --help Display usage information |
Hello, This thread helped me. Can someone verify if this is the best way to have a bash script compile multiple separate files at once and watch for change? My main issue was that:
Based on this thread: Full bash script:
|
this drives me mad man |
What version of Tailwind CSS are you using?
v3.2.4
What build tool (or framework if it abstracts the build tool) are you using?
TailwindCSS standalone binary
What operating system are you using?
Happens on both Linux and Windows
Describe your issue
I have a shell script to start my development server:
This worked perfectly fine with TailwindCSS v3.1.8 but now I upgraded to v3.2.4 and it doens't work anymore.
Downgrading to v3.1.8 makes it work again.
Expected behaviour
When running the script, the Tailwind watcher should run as a background process and I should see its output (Rebuilding...Done in 267ms) in stdout.
Actual behaviour
The Tailwind watcher doesn't run and I can't see any output in stdout.
Note
When running the command in foreground (without
&
at the end) it works as expected. So as a workaround I run flask in background and tailwind in foreground.The text was updated successfully, but these errors were encountered: