Giter VIP home page Giter VIP logo

css-byebye's People

Contributors

aodev avatar elchininet avatar gitter-badger avatar mewdriller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

css-byebye's Issues

Update to postcss 8.2.13 or newer to prevent vulnerability

npm audit it throwing the following issue (GHSA-566m-qj78-rww5):

Severity: moderate
Regular Expression Denial of Service in postcss - https://github.com/advisories/GHSA-566m-qj78-rww5
No fix available
node_modules/css-byebye/node_modules/postcss
  css-byebye  *
  Depends on vulnerable versions of postcss
  node_modules/css-byebye

postcss.plugin was deprecated in postcss8

when i use postcss8+css-byebye in my project, that warns:

css-byebye: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration

would u pls fix it up?

Not supported in PostCSS version 5.0.X

I get the following error when trying to use the plugin: "Your current PostCSS version is 5.0.2, but css-byebye uses 4.1.16. Perhaps this is the source of the error below".

Do you plan to release a new version of the plugin?

Allow css-byebye to be consumed in a PostCSS pipeline?

This module should not wrap the PostCSS API, but instead expose itself as a processor that can be used in a pipeline along with other transforms:

var postcss = require('postcss');
var css = 'a { font-size: 12px; } .hello .h1 { background: red } .world { color: blue }';

var output = postcss([
    require('css-byebye')({rulesToRemove: ['.world']}),
    require('autoprefixer')
]).process(css).css;

// do whatever with output

You can do this easily via the new postcss.plugin() API introduced in 4.1, which enables us as plugin developers to develop consistent tools for the PostCSS ecosystem:

var postcss = require('postcss');

module.exports = postcss.plugin('css-byebye', function (opts) {
    // use the options passed to you and return a transformation
    return function (css) {
        css.eachRule(function () { /* your logic here :) */ });
    }
});

That way we can use css-byebye alongside other processors to transform CSS many times in memory. ๐Ÿ˜„

Parse css file for selectors

Is it possible to parse a css file to retrieve the array of selectors?

I've got two css files where I'm trying to remove the duplicates.

Delete only the exact selector

Could be possible delete only the exact selector from the array? I mean, if rulestoRemove contains #header removes only the #header selector and not #header li.
It will be useful to delete empty selectors for example.

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.