simbo / css-mqpacker-sort-mediaqueries

Sorts mediaqueries by min-width and/or max-width, ordered ascending (to be used as sort option value for postcss plugin css-mqpacker)
2 stars 0 forks source link

Alternative to mqpacker #1

Open jonnitto opened 5 years ago

jonnitto commented 5 years ago

I don't know why, but https://github.com/hail2u/node-css-mqpacker is deprecated. Do you have an alternative?

simbo commented 5 years ago

I contacted Kyo Nagashima, the developer of css-mqpacker, and tried to find out what's going on. I wrote him an email offering maintenance for the package and opened this issue: https://github.com/hail2u/node-css-mqpacker/issues/72

I didn't get any response. And he archived the project so I guess he's not interested in any further work on this project.

I still see usecases for the plugin and I am using it in a lot of projects. I don't know any reasons why it should be obsolete.

So, I am creating a fork / rebuild asap and will publish it within the next weeks. I will add updated information to this ticket.

Alecto commented 5 years ago

thanks!

flowen commented 4 years ago

for anyone wondering, I believe @simbo created a fork right here https://github.com/simbo/node-css-mqpacker.

edit: reason why I came here, is because npmjs.org still seems to install the 7.0.0 deprecated version. The forked version refers to the same package, how can I install the forked version @simbo ?

hacknug commented 4 years ago

@flowen code on Simbo's fork is exactly the same as the one on the archived repo. That's probably why there's nothing new published on NPM.

orionrush commented 4 years ago

So do we keep linking to NPM's "css-mqpacker", and when @simbo updates we can find the changes there automatically? Or should we start linking to this repo directly instead?

hacknug commented 4 years ago

I'd say install css-mqpacker from NPM and if Simbo or someone else publishes a new version, they might let us know in this issue. Then we can replace the old css-mqpacker with whatever the new version is called 👍

lecodeur commented 4 years ago

A possible alternative is to pipe through clean-css https://www.npmjs.com/package/clean-css-cli

Level 2 optimisation mergeMedia controls @media merging; defaults to on

philwareham commented 4 years ago

Potential postCSS replacement for css-mqpacker: https://github.com/SassNinja/postcss-combine-media-query

Not tried it yet but will do shortly and report back here.

jonnitto commented 4 years ago

I tried postcss-combine-media-query. Unfortunately, this doesn't sort the media queries.

philwareham commented 4 years ago

@jonnitto Yeah, it didn't work for my needs either. 😕

nickclyde commented 4 years ago

Here is another alternative: https://github.com/yunusga/postcss-sort-media-queries