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

cdk init should have option to produce new project with fixed file and class names #4865

Open
2 tasks
ghost opened this issue Nov 5, 2019 · 8 comments · May be fixed by #29695
Open
2 tasks

cdk init should have option to produce new project with fixed file and class names #4865

ghost opened this issue Nov 5, 2019 · 8 comments · May be fixed by #29695
Labels
effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. management/devenv Related to CDK development/build environment p2 package/tools Related to AWS CDK Tools or CLI

Comments

@ghost
Copy link

ghost commented Nov 5, 2019

There should be a cdk init template that doesn't use the name of the project folder to generate file and class names.

Use Case

Every once in a while I get feedback on the Getting Started topic in the Developer Guide stating that a class name or filename is wrong. Inevitably this is caused by someone who has named their folder something other than "hello-cdk" as the instructions direct. Since cdk init uses the project folder name as part of the generated file and class names, this throws off all the rest of the instructions, and the customer has trouble getting the example to work.

This is by far the single most common issue reported with the CDK Developer Guide. I added a note to Getting Started describing the issue and explaining the importance of naming their project folder "hello-cdk," but I just received another report of it.

It would improve the Getting Started experience if we could remove this stumbling block to customers being successful at trying out the CDK.

Proposed Solution

Let's provide a template (maybe named something like "hello") that we can use specifically in Getting Started and perhaps the CDK Workshop. This template should use static file and class names so the customer can name their project folder whatever they want without affecting the files inside it.

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@ghost ghost added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 5, 2019
@SomayaB SomayaB added the management/devenv Related to CDK development/build environment label Nov 5, 2019
@NGL321 NGL321 added package/tools Related to AWS CDK Tools or CLI and removed needs-triage This issue or PR still needs to be triaged. labels Nov 5, 2019
@eladb
Copy link
Contributor

eladb commented Nov 6, 2019

I think it makes sense to support something like —project-name. @nmussy might be interested to pick this up as he was dwelling in this space recently.

@nmussy
Copy link
Contributor

nmussy commented Nov 6, 2019

Thanks for the ping Elad. I can definitely look into it, I should be available tonight.

@ghost
Copy link
Author

ghost commented Nov 6, 2019

@eladb That's an even better solution than my idea. I like it.

@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Nov 6, 2019
@shivlaks shivlaks added the effort/small Small work item – less than a day of effort label Jan 29, 2020
@shivlaks shivlaks added the p2 label Aug 7, 2020
@NGL321 NGL321 assigned rix0rrr and unassigned shivlaks Jan 25, 2021
@rix0rrr rix0rrr removed their assignment Jun 3, 2021
@nomadme
Copy link

nomadme commented Nov 5, 2021

This is really needed feature.

@gmwill934
Copy link

is this available?

@PeterBaker0
Copy link

I agree this would be very helpful

@TheRealAmazonKendra TheRealAmazonKendra removed the in-progress This issue is being actively worked on. label Jan 25, 2023
@dreamorosi
Copy link
Contributor

Hi, if the feature is still welcome I'd like to try working on a PR.

@Tech-Toplets
Copy link

I like the idea of being able to provide a custom package name, instead of "hello-cdk".
Especially many CDK users are mediate or advanced programmers and they are not going to start their project with "hello world" situation.

@nmussy nmussy linked a pull request Apr 2, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. management/devenv Related to CDK development/build environment p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet