Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App codegen module organization #119

Open
krisbitney opened this issue Oct 19, 2023 · 0 comments
Open

App codegen module organization #119

krisbitney opened this issue Oct 19, 2023 · 0 comments

Comments

@krisbitney
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant