SassNinja / postcss-extract-media-query

PostCSS plugin to extract all media query from CSS and emit as separate files.
MIT License
130 stars 20 forks source link

extractAll not working #12

Closed bnmlynx closed 4 years ago

bnmlynx commented 4 years ago

Hey,

I'm trying to only extract media queries for one size, but I can't seem to get the extractAll option to work.

Using your gulp example as a starting point here is my postcss.config.js

image

I'm still getting an example-screen-and-min-width-px.css

image

Any help would be much appreciated, awesome plugin btw!

SassNinja commented 4 years ago

hi @bnmlynx

you've use the gulp example without modification, haven't you?

I've just noticed I didn't update the package.json file of the examples meaning they all refer to an older version of the plugin without extractAll support

I'll update it asap!

SassNinja commented 4 years ago

ok, done!

https://github.com/SassNinja/postcss-extract-media-query/tree/master/examples/gulp

you can fix this easily yourself by running npm install postcss-extract-media-query@latest --save-dev

apart from that I spotted an error in the gulpfile: deleteMatch: true was missing in the options https://github.com/SassNinja/postcss-extract-media-query/blob/master/examples/gulp/gulpfile.js#L10

afterwards everything works correctly in this example

bnmlynx commented 4 years ago

Amazing!

Thank you very much for your speedy reply and fix!