Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

eladbcommented, 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.

gmwill934commented, Jun 22, 2022

is this available?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS CDK Toolkit (cdk command) - AWS Documentation
cdk init. Creates a new CDK project in the current directory from a specified template ... All options accept a value, which must...
Read more >
Initializing a new CDK app - Taimos GmbH
In this blog post, I want to show you how to create a new CDK project for your application deployment. We will initialize...
Read more >
How to Create Awesome Repeatable Project Setups for AWS ...
The goal is to make it easy and quick to set up a useful and productive project setup for use with AWS CDK....
Read more >
AWS CDK Tutorial for Beginners - Step-by-Step Guide
In order to create a new CDK App we have to use the cdk init command. ... Let's look at some of the...
Read more >
cdk init | AWS CDK Workshop
We will use cdk init to create a new TypeScript CDK project: ... about initialization of a git repository, this probably means you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found