ember-cli-autoprefixer
ember-cli-autoprefixer copied to clipboard
Should ignore css files by third parties
I have a bunch of css files in /public and /vendor and auto-prefixer is attempting to parse them. Causing the build to fail because they contain mistakes (out of my scope)
I am also seeing warnings from my vendor CSS files when I run ember build. Would definitely make sense to ignore these. I'm on the latest, 0.4.1.
Building..
autoprefixer: /my-project/assets/vendor.css:21:16225: Gradient has outdated direction syntax. New syntax is like "to left" instead of "right".
autoprefixer: /my-project/assets/vendor.css:21:16742: Gradient has outdated direction syntax. New syntax is like "to left" instead of "right".
autoprefixer: /my-project/assets/vendor.css:21:18890: Gradient has outdated direction syntax. New syntax is like "to left" instead of "right".
autoprefixer: /my-project/assets/vendor.css:21:19519: Gradient has outdated direction syntax. New syntax is like "to left" instead of "right".
...
I can agree that it would make sense to ignore errors (although why would you want to build with css that doesn't work?), but I'm not entirely convinced you wouldn't want to autoprefix your dependencies. Wouldn't you want to enforce your defined targets and/or remove code you don't need?
Because the errors occur in the vendor.css, we have no way of resolving these errors and thus we keep seeing these error appear every single time we run ember s. It's a nuisance...
Also one could argue it's not our responsibility to improve vendor packages. It's up to the authors of those vendor packages to prefix and minify their CSS. Their repo is the appropriate place to add Autoprefixer, not every package consumer's local environment. Mind the performance hits.
I'm seeing these every day and cannot fix...
autoprefixer: /Users/Jan/project/assets/vendor.css:2714:3: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
autoprefixer: /Users/Jan/project/assets/vendor.css:2779:3: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
autoprefixer: /Users/Jan/project/assets/vendor.css:2831:3: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
autoprefixer: /Users/Jan/project/assets/vendor.css:2882:3: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
autoprefixer: /Users/Jan/project/assets/vendor.css:2954:3: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
autoprefixer: /Users/Jan/project/assets/vendor.css:3343:3: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
Also one could argue it's not our responsibility to improve vendor packages. It's up to the authors of those vendor packages to prefix and minify their CSS. Their repo is the appropriate place to add Autoprefixer, not every package consumer's local environment. Mind the performance hits.
Yeah, I can agree on that.
If anyone has ideas on how we could make this change, then feel free to share or make a PR. It's kind of a breaking change, so we'll have to keep that in mind before releasing.
Unfortunately, I can't see having time to work on this any time soon.
What about adding it as an opt-in flag? That would avoid breaking existing projects.
// ember-cli-build.js
const app = new EmberApp(defaults, {
autoprefixer: {
vendor: false
}
});