Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PostCSS parser? #11

Open
ben-eb opened this issue Mar 28, 2015 · 7 comments
Open

Use PostCSS parser? #11

ben-eb opened this issue Mar 28, 2015 · 7 comments

Comments

@ben-eb
Copy link
Contributor

ben-eb commented Mar 28, 2015

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? 😄

https://github.com/postcss/postcss

@furzeface
Copy link
Contributor

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
Copy link
Contributor Author

ben-eb commented Apr 3, 2015

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
Copy link
Contributor Author

ben-eb commented Jun 11, 2015

@furzeface I propose the following roadmap:

  • Extract disk operations logic out of the main core of the module, so that we have three parts - disk IO, CSS transform, and CLI.
  • Combine CLI and disk IO together, preferably using some stdio transforms to make the CLI more robust.
  • Test the CSS transform standalone, with no disk IO. I propose using tape (https://github.com/substack/tape), a lightweight test runner.
  • Clean up redundant code in the module, keeping the tests passing.
  • Convert over to PostCSS.
  • Possibly in there somewhere we can have a look at ES6 with Babel. If you are OK with that.

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
Copy link
Contributor

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
Copy link
Contributor Author

ben-eb commented Aug 7, 2015

Any updates on this?

@ben-eb
Copy link
Contributor Author

ben-eb commented Apr 19, 2016

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

@JohnCashmore
Copy link
Member

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" [email protected] 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
#11 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants