Closed minasmart closed 8 years ago
@swalkinshaw @tessalt @mikkoh wanna have a look?
This is the thing that actually extracts types from a json schema and bundles them up. This is just the API, no CLI yet.
I know it's big, but a large number of the files are just really terse predicate functions or test fixtures.
Regarding the babel generators: It just saves some effort over properly escaping values, and gives a hint as to wether we're generating valid code.
I was doing this all with string interpolation before, but this gives some better guarantees.
The fact that we're using babel also allows us to ensure we're matching whatever a client environment targets, babel-plugin wise. I haven't exposed params yet, but we could easily return the AST for everything and let people generate using whatever plugin set they like 😄 .
Extracting es6 module generation from js buy into its own thing