Skip to content

Code generation templates support #877

@larryonoff

Description

@larryonoff

Code generation is not flexible now.

  1. Only concrete languages (Swift, TypeScript, Flow) can be specified.
  2. The structure of the generated code cannot be changed.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions