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

Error out when using -w when writing to stdout #156

Closed
xiaoosnggao opened this issue Aug 31, 2017 · 4 comments
Closed

Error out when using -w when writing to stdout #156

xiaoosnggao opened this issue Aug 31, 2017 · 4 comments
Assignees
Milestone

Comments

@xiaoosnggao
Copy link

I used File Watchers in webstorm to add autoprefixer to suggest an error
image

postcss-cli、autoprefixer version
image

What is the reason for that?

@michael-ciniawsky
Copy link
Contributor

michael-ciniawsky commented Aug 31, 2017

- ...-o -w
+ -o path/to/dist -w  

From the screenshot it's seems to be a command line args mismatch and the result is logged to STDOUT atm, because no path is given to -o|--output

postcss $INPUT -u $PLUGINS -o $OUTPUT -w

-w|--watch (Watch Mode) and piping to STDOUT doesn't work and the filter call fails for this reason in the watcher logic

@RyanZim
Copy link
Collaborator

RyanZim commented Aug 31, 2017

We should modify our logic here to error out with a friendly error message.

@xiaoosnggao
Copy link
Author

@michael-ciniawsky
Thanks for your prompt, my network storm editor has been successfully configured.
But the editor set file watchers configuration less add autoprefixer, my mac becomes very cardton, I also need to find other ways to optimize, or replace the editor.

@RyanZim
Copy link
Collaborator

RyanZim commented Sep 5, 2017

Reopening to remind me to add an error message.

@RyanZim RyanZim reopened this Sep 5, 2017
@RyanZim RyanZim changed the title Cannot read property 'filter' of undefined Error out when using -w when writing to stdout Sep 5, 2017
@RyanZim RyanZim self-assigned this Dec 5, 2017
@RyanZim RyanZim added this to the 5.0.0 milestone Dec 6, 2017
@RyanZim RyanZim closed this as completed in 4b2421b Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants