sindresorhus / gulp-autoprefixer

Prefix CSS
MIT License
694 stars 50 forks source link

Show PostCSS warnings #56

Closed ai closed 8 years ago

ai commented 8 years ago

Right now Autoprefixer generates a lot of really important warnings.

But seems like users do not see them: https://github.com/postcss/autoprefixer/issues/602#issuecomment-168789444

sindresorhus commented 8 years ago

It already does: https://github.com/sindresorhus/gulp-autoprefixer/blob/8cc62f4fa3c8bc8ab1efe2c59fe7c13ee5c7b652/index.js#L31-L35

ai commented 8 years ago

Yeap, but seems like it has some issue.

sindresorhus commented 8 years ago

I'm doing the same as gulp-postcss: https://github.com/postcss/gulp-postcss/blob/8414a14c95f7c76bef8546ad6383c6f7678076f5/index.js#L63-L65

kentmw commented 8 years ago

I wish there was a way (an option) to silence the warnings.

sindresorhus commented 8 years ago

@kentmw That would be a request to Autoprefixer, not this plugin.

kentmw commented 8 years ago

@sindresorhus I don't think so. I followed your link: https://github.com/sindresorhus/gulp-autoprefixer/blob/8cc62f4fa3c8bc8ab1efe2c59fe7c13ee5c7b652/index.js#L31-L35 and you are the one logging it out. We just need to add a flag for this plugin to not log it out, right?

sindresorhus commented 8 years ago

It only logs if there are warnings: https://github.com/sindresorhus/gulp-autoprefixer/blob/8cc62f4fa3c8bc8ab1efe2c59fe7c13ee5c7b652/index.js#L33 It should be up to Autoprefixer not to emit any.

kentmw commented 8 years ago

It's not Autoprefixer that is logging it. They have a nice way to retrieve warnings if you want them. This plugin is actively going out, grabbing them, and printing them. Autoprefixer isn't printing them. They just silently generate warnings.

sindresorhus commented 8 years ago

Ok. I'm not interested in having such option as I think it belongs in Autoprefixer. Your way, every consumer have to manually implement such option instead of just Autoprefixer.