Closed stevenvachon closed 7 years ago
@stevenvachon Can be solved via plugin.
postcss.plugin('messages', () => (css, result) => {
const warnings = result.warnings();
result.messages = result.messages.filter(msg => msg.type !== 'warning');
})
Ok, but I don't want to add custom code to my gulpfile, or create additional files. I think that this request would be a reasonable addition to this project.
I don't think we need to support this case, because the current options are 1 to 1 from postcss, and by introducing custom options we may accidentally end up with overlapping options.
I prefer to keep this runner as thin as possible, so if something may be achieved via postcss configuration or an additional plugin, it will not be implemented here.
If postcss changes from a Promise
, you could remove the option in a necessary new major release. Not implementing options for the gulp wrapper defeats the reason we use gulp.
Gulp is not about implementing options. There is a big confusing in gulp uglify which introduced some options and they didn't worked in API. Such wrappers should reduce gap between APIs, not increase by introducing own stuff.
The reason we use gulp is to abstract APIs and reduce custom code. You're proposing that I introduce more code.
You are always introduce custom code with custom requirements. There's nothing to do with abstraction.
For me gulp is configuration as code. Composability over configuration.
It'd be great if this option were available to silence debug logging. This becomes important when building the same files multiple times with different options, and only needing to see a set of errors once.
This is related to #93.