json_to_dart
json_to_dart copied to clipboard
Allow generating code as a compiler tool
any chance this can be adjusted so it functions as a tool at compile time ? a bit like other dart generators, where you point it to a directory and it generates the code for you.
you can still have it also work on the web too for.
I'm not quite sure if that is possible, can you set up a hook in the dart compiler?
You can compile using a bash script that execute this library before the actual compile. You can check the example to see how would execute this as a standalone software.
Yes you can do codegen in a more elegant way.
This is a great library doing just that using the standard dart codegen facilities https://github.com/davidmarne/built_redux/tree/dart-2-dev
This is really interesting. I don't have much time to do that at the moment, but if anyone wants to contribute I'm more than willing to accept a PR.
I finally figured out how to create a builder with this package. I might do it shortly, I might not. This so simple that it should be really easy for anyone to contribute to the project.