styled-ppx icon indicating copy to clipboard operation
styled-ppx copied to clipboard

Add a type generator from CSS Spec

Open joseemds opened this issue 2 years ago • 1 comments

This is not complete, right now it is only running at the spec.re file, but it also works at Parser.re.

This produces the right output based on #301 and produces an opaque type as a fallback for the non implemented part of the spec.

The snapshot test is not outputting the types, but when i check it with esy dune describe pp packages/reason-css-parser/test/spec.re.ml the output is right, i don't know if it is because Ppxlib.Driver.standalone() doesn't run preprocess_impl or something else and i could not discover the reason.

I want to add some unit tests for EmitType but i think that first it should be exposed as a library, so should it live at reason-css-parser/lib or somewhere else?

One alternative for not depend on the file path would be to use a command line argument (like -gen-type) and pass it only to Parser.re and spec.re using dune per_module stanza WDYT?

joseemds avatar Aug 24 '22 22:08 joseemds

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
styled-ppx ✅ Ready (Inspect) Visit Preview Sep 23, 2022 at 0:01AM (UTC)

vercel[bot] avatar Aug 24 '22 22:08 vercel[bot]