Code generation is not flexible now.
- Only concrete languages (Swift, TypeScript, Flow) can be specified.
- The structure of the generated code cannot be changed.
- New language support requires changes directly in the code.
So I propose to introduce templates support.
Great example of code generation is SwiftGen. It uses a template language syntax similar to Django and Mustache. It has default templates and allows creating custom templates.
There's js library mustache.js that provides templates support.
My proposal is to migrate code generation into mustache.js-like templates for all supported languages.
Code generation is not flexible now.
So I propose to introduce templates support.
Great example of code generation is SwiftGen. It uses a template language syntax similar to Django and Mustache. It has default templates and allows creating custom templates.
There's js library mustache.js that provides templates support.
My proposal is to migrate code generation into mustache.js-like templates for all supported languages.