There two main approches of handling upgrades when using a code generator:
- The generated code is never touched (only extended...), and regeneration only updates these files
- Generated code is stored in a separate branch where generation is done no changes are done manually, the generated branch is merged with master at each upgrade
I find the first approach hard to work with for two reasons:
- some files can't be extended like package.json ...
- Extending all the files makes for bigger code base and adding simple changes can add a lot of work