Have you ever tried using or extending source_gen? Did you see how tedious it was at first? Have you fought again with it in another project when you needed it again?
This utility library for source_gen tries to solve those problems, with additions on creating easily your own generators in a uniform way.
Requirements:
To install:
> pub global activate source_genTo update, run activate again:
> pub global activate source_gen> source_gen path/to/file1.dart path/to/file2.dart path/to/directoryWill process file1.g.dart, file2.g.dart and all the generation demanding files of /path/to/directory.
As that command is tedious, you should create a source_gen.yaml that avoids you the need of including those params. As doing that is tedious too, here you have the command:
> source_gen config-fileThat configuration file will make your life easier in many ways, including the avoiding of those params previously written.
> source_gen #Build the desired generated code
> source_gen --watch #Watch for file editions and rebuild 'emLike with stagehand, here you could create your own Generator repo in a standarized way that helps this package detect its generators. Just create your generator's dir and scaffold:
> mkdir MyGenerator
> source_gen new generator_packageBut this package would be a contradiction if it wouldn't include generations for more code apart from the starting one. So here you have the command for those Generator's generation:
> source_gen add generator