clean-css / clean-css-cli

The command line interface to clean-css CSS optimizer
MIT License
305 stars 17 forks source link

Any plan to support --watch? #15

Closed plantain-00 closed 2 years ago

jakubpawlowicz commented 7 years ago

What are the other options here as I'm not familiar with the matter. Anyway PRs are always welcome.

ilog2000 commented 6 years ago

@plantain-00 means that CLI packages can be run with --watch option to track changes in uncompressed file and re-execute minification. A good example is 'myth' package (it is broken now with node v6+). Current work around for me is 'onchange' package. You can look inside their code.

[Edit]: here is a good intro about watching https://mikej.codes/post/watching-file-changes-npm-scripts

jakubpawlowicz commented 6 years ago

I'd be interested in adding it to CLI as it's a rather common feature.

dnovacik commented 6 years ago

+1

christiankozalla commented 2 years ago

Hey @jakubpawlowicz

I am going to tackle this issue. I've just experimented a little bit with chokidar and it is working with a single file input. Now I am trying to make it work for batches. Hoping to submit a PR soon!

jakubpawlowicz commented 2 years ago

Thanks @christiankozalla - let me take a look at the PR.

jakubpawlowicz commented 2 years ago

Closing this a version 5.5 includes the functionality.