Skip to content

cdktf-init typescript template general QOL improvements #2490

Open
@acdoussan

Description

@acdoussan

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

  • Please update the default template to output the built .js / .d.ts files from typescript to a build folder (aka set outDir to build), rather than dumping them next to the code. These files clutter up the folder and I don't want to see them.
  • Support absolute paths by default. Ref: https://discuss.hashicorp.com/t/cdktf-tsconfig-paths-not-working-for-local-imports/46163/6?u=acdoussan
  • It would be nice if the initial project setup was slightly more sophisticated, rather than having everything in a single file. I propose creating a src directory, which contains an app.ts file and a exampleStack.ts file. main.ts instantiates the app from app.ts, app.ts instantiates the stack from exampleStack.ts, exampleStack.ts can stay empty as it is in the current template. Example on what this would look like can be seen in this issue.

References

https://www.typescriptlang.org/tsconfig#outDir

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions