Add --ignore flag to CLI to support excluding paths from file watching #18507
cleverbunnykeith
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The Tailwind CSS CLI currently supports
--watch
, which works well for most workflows. However, it lacks a mechanism to ignore specific paths or globs from triggering rebuilds.This feature would add a new
--ignore
(-g) flag that passes ignore patterns directly to the underlying@parcel/watcher
instance.Motivation
I'm working with Tailwind in an Elixir-based build system that watches the entire project directory, including template files and generated assets. Without the ability to ignore directories, such as
priv/static/assets
, any change in built output triggers an unnecessary rebuild — creating a feedback loop of changes.This
--ignore
flag would solve that problem cleanly and enables a broader range of integrations, particularly in environments where full-project watching is required.Example usage
tailwindcss -i input.css -o output.css --watch --ignore "priv/static/assets/**"
Let me know if there are any edge cases you'd like to see covered or if you'd prefer a different flag signature.
Ref: phoenixframework/tailwind#128
Beta Was this translation helpful? Give feedback.
All reactions