frontendfriends / node-combine-mq

Combine matching media queries into one media query definition. Useful for CSS generated by preprocessors using nested media queries.
MIT License
19 stars 11 forks source link

Use PostCSS parser? #11

Open ben-eb opened 9 years ago

ben-eb commented 9 years ago

PostCSS is being used by quite a few projects, the main one being https://github.com/postcss/autoprefixer - its parser is much faster than others and is very robust; but I think the main benefit is for usage in a pipeline of in-memory transforms, so that people can run tasks such as autoprefixing, combining media queries, minifying etc, without having to read from disk in every step.

The responsibility of disk operations can then be extracted out of the main source code of the module, so that it can be used as a plugin to operate on in-memory CSS.

What do you think? :smile:

https://github.com/postcss/postcss

furzeface commented 9 years ago

Hey @ben-eb - yep that's a great idea, one of the guys had a go at moving it over a while ago but we ran out of time.

Is it something you'd want to look at helping out with? If not, we'll try and get round to it when there's time.

Thanks, Dan.

ben-eb commented 9 years ago

Yeah, I'd like to help out with this; but, I am currently working through a lot of university work and only really have been publishing modules that are relevant to my assignments. So I am hopefully looking at doing more contributions to other projects later on in May, after my deadlines.

I had a look at https://github.com/hail2u/node-css-mqpacker which has the same goals as your project, but I wasn't sure how much overlap/difference there is between your two projects. Perhaps it might be good to join forces with @hail2u?

ben-eb commented 9 years ago

@furzeface I propose the following roadmap:

We will then have a module which can be consumed inside PostCSS, or as a standalone lib with a stdio supported CLI, and sourcemaps. Once this is done, I can have a look at bundling it with https://github.com/ben-eb/cssnano - I think combining media queries is an important minification step.

furzeface commented 9 years ago

A good way forward, having a look at your fork now too :)

cc @spacedawwwg and @JohnCashmore too for this - you guys know way more about the original, want to get involved when you can?

ben-eb commented 8 years ago

Any updates on this?

ben-eb commented 8 years ago

I'm still happy to work on this but I need feedback from you guys.

JohnCashmore commented 8 years ago

I'd do whatever you thinks best a lot has changed in the front end world in the past 12 months and I think working out if this is still a required tool and what is the best tool to process the css may have changed On 19 Apr 2016 16:54, "Ben Briggs" notifications@github.com wrote:

I'm still happy to work on this but I need feedback from you guys.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/frontendfriends/node-combine-mq/issues/11#issuecomment-211991769