Add --watch flag to the build
command
#2278
DCzajkowski
started this conversation in
Ideas
Replies: 1 comment
-
Update: The first attempt at the implementation was made here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use case
Sometimes I want to create a simple playground for experimentation and pulling Webpack or Parcel seems like an overkill.
Also, it's not that easy to set up Webpack or Parcel to listen on config file changes (and this is where most of the changes happen anyway.)
For those situations Tailwind provides
tailwindcss build
, but it runs just once — there is no way to listen to changes.Current scenario
tailwind.config.js
, edit and saveapp.css
, save (so that the build is retriggered)Proposed solution
It would be cool to have
tailwindcss build --watch
so that manual builds or external tools are not required.tailwindcss build app.css -o dist/app.css --watch
tailwind.config.js
, edit and saveFirstly, there is two steps less. Profit! But most importantly, there is no need to setup any external tools which saves time and decreases friction 💸
Summary
I have already implemented the
--watch
flag and I was wondering if anyone is interested in this 😄 If there is positive feedback, I'll post a PR 💪Here is a demo (external link to streamable):
Beta Was this translation helpful? Give feedback.
All reactions