Open Tamerlanchiques opened 1 year ago
How about a Makefile with the following contents:
watch:
dart run build_runner watch -d
And then in your readme ask users to run make watch
in their terminal. This will automatically re-generate code as needed.
You can just run this command, it will watch and regenerate the code if needed only.
dart run build_runner watch --delete-conflicting-outputs
Hi. I would ask how to make integration of json_serializable more convenient in terms of repository that contains ready to run code base. I think that storing of generated files in repo is not optimal way and better to generate all necessary files on local machine. But new-comers in my project will be confused about how to generate missing files.
So my question is: Is that possible to automate process of generating missing .g.dart files? Maybe extension for VS Code or something?
My current thoughts is that I can make .sh script and run
dart run build_runner build
but it takes around 20 secs of time each run even if no files missing.