Skip to content

App codegen module organization #119

@krisbitney

Description

@krisbitney

App codegen currently puts all generate types in a single file, even when multiple wraps were imported.

Example: https://github.com/polywrap/wrap-abi-bindgen/blob/main/implementations/app-typescript/src/__tests__/cases/000-sanity/output/types.ts

We can reduce users' cognitive load by organizing the generated types into modules, making it easier for them to browse the wrap directory and understand what was generated.

Each imported wrap should have its own named directory. Each Module class should be in its own file, with a separate file for the types.

Current:

 wrap/
└── types.ts

Proposed:

wrap/
├── ethers/
│   ├── module.ts
│   └── types.ts
└── safe/
    ├── module.ts
    └── types.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions