Skip to content
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 config file #26

Closed
RyanZim opened this issue May 23, 2016 · 11 comments
Closed

Watch config file #26

RyanZim opened this issue May 23, 2016 · 11 comments
Milestone

Comments

@RyanZim
Copy link
Collaborator

RyanZim commented May 23, 2016

Currently when the -w & -c options are specified, postcss rebuilds the css files only when the input file changes (and does not reload the config file). If you change the config file, you need to cancel the process and re-run it.

This is irritating for me since I call postcss from an npm script that starts a dev server, my browser, etc. This script takes a bit of time to start or cancel, so I waste a lot of time when changing the config file. ⌛

I think that when both the the -w & -c options are specified, postcss should reload the config and rebuild the css when a change is detected in the config file.

I'm not sure if I can submit a PR or not. (I'm extra busy right now)

@RyanZim
Copy link
Collaborator Author

RyanZim commented Jun 22, 2016

@pirxpilot, @watilde bump.

I'm currently wrapping postcss with chokidar-cli as a workaround.

@RyanZim
Copy link
Collaborator Author

RyanZim commented Jun 27, 2016

@pirxpilot @watilde @ai bump, bump, bump.

@watilde
Copy link
Member

watilde commented Jun 27, 2016

Oops so sorry for my late response. Let me check it.

@watilde
Copy link
Member

watilde commented Jun 28, 2016

Thanks for the feature request. I agreed with this! I will try to create a patch and also let me keep the thing it's still patch-welcome as well.

@RyanZim
Copy link
Collaborator Author

RyanZim commented Aug 15, 2016

@watilde Currently there's no good way to do this with yargs. Let's put this on hold until yargs/yargs#585 is resolved.

@RyanZim RyanZim added this to the v3.0.0 milestone Jan 4, 2017
@RyanZim
Copy link
Collaborator Author

RyanZim commented Jan 4, 2017

We will be supporting the common config in v3, which should allow us to do this, so adding this issue to the v3 milestone.

@michael-ciniawsky
Copy link
Contributor

@RyanZim Seems to be trickier then I thought 😛 , do you have started anything in this regard already?

@RyanZim
Copy link
Collaborator Author

RyanZim commented Jan 14, 2017

@michael-ciniawsky I'll hit this asap.

@michael-ciniawsky
Copy link
Contributor

michael-ciniawsky commented Jan 14, 2017

@RyanZim I played around with declaring a variable in global scope assigning the config.file configFile = arr[1].file to, but adding it to watcher.watch([ input, configFile ]) doesn't work because of watcher logic. The question is how to trigger a rebuild of all files, but tbh I didn't check chokidar docs for all possible optons until now.

@RyanZim
Copy link
Collaborator Author

RyanZim commented Jan 14, 2017

Don't worry, I'll get it.

@michael-ciniawsky
Copy link
Contributor

@RyanZim fixed via #69

@RyanZim RyanZim closed this as completed Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants