Giter Club home page Giter Club logo

Comments (10)

raemadeline avatar raemadeline commented on May 30, 2024

I am getting a ton of warnings from autoprefixer because one of my vendor dependencies uses an outdated syntax for gradients. It would be really really great to have this feature so I can get rid of all this noise.

from ember-cli-postcss.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

@raemadeline thanks for reporting this! I'd like to implement this soon. Do you mind sharing your postcss config and an example of the warning output? I think it would help for testing this feature.

As a short term fix, are you using postcss-reporter as one of your plugins? I'm curious if passing { plugins: ['!autoprefixer'] } as part of the options object would silence the warnings by blacklisting reporting for autoprefixer. I don't think this is a long term solution as you'd want that logging for parsing other dependencies or files, but it might help with all the console noise in the short term.

from ember-cli-postcss.

raemadeline avatar raemadeline commented on May 30, 2024

Sure. Here's my postcss config

postcssOptions: {
  compile: {
    enabled: false
  },
  filter: {
    enabled: true,
    plugins: [
      {
        module: autoprefixer,
        options: {
          browsers: ['last 2 version', 'Safari >= 8']
        }
      }
    ]
  }
},

And the warnings basically look like this:

autoprefixer: /Users/raemadeline/project/assets/vendor.css:44:5: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.

But with many occurrences (a lot of noise) due to a lot of my dependencies using this outdated syntax.

I am not using postcss-reporter but it looks useful and I think I will add it to my setup. I would rather not silence the autoprefixer warnings in case there is a warning for code in my app (as opposed to 3rd party libraries), hence why I want to filter out my vendor dependencies

from ember-cli-postcss.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

@raemadeline thanks for supplying the config and an example warning. I don't think my suggestion is a great fix, just that it might help until this feature is implemented.

Do you mind providing the name of the vendor dependency you're using so I can test against it? Thanks.

from ember-cli-postcss.

raemadeline avatar raemadeline commented on May 30, 2024

@jeffjewiss the vendor dependency thats causing this error is CKEditor

from ember-cli-postcss.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

Thanks. I wasn't able to replicate the gradient warnings locally, but that could be due to how I'm including CKEditor or differing theme files.

I think I have filtering vendor dependencies working, but don't have a great project to test it on. Do you mind testing it out on your project?

You would need to run npm install --save-dev jeffjewiss/broccoli-postcss#filter-vendor-deps and then update the options for filter to have the exclude property:

filter: {
  enabled: true,
  exclude: ['ckeditor/**/*'],
...

from ember-cli-postcss.

raemadeline avatar raemadeline commented on May 30, 2024

Wait this is for ember-cli-postcss, how would installing the broccoli-postcss package help?

from ember-cli-postcss.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

Sorry for the delay on this.

I was originally thinking that installing broccoli-postcss in your project would override the dependency in ember-cli-postcss, but I'm not confident that's the case.

I've pushed a branch to ember-cli-postcss instead, so you can run: npm install --save-dev jeffjewiss/ember-cli-postcss#filter-vendor-deps and update the options mentioned above.

Thanks for helping me debug and test this issue.

from ember-cli-postcss.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

Hey @raemadeline, just wondering if you'll have a chance to take a look at this. Thanks!

from ember-cli-postcss.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

It's now possible to white-list/black-list the files that are processed by the filter method by using the include and exclude options. An example is outlined in the readme.

from ember-cli-postcss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.