For npm/yarn-based build, the CDK should be entirely self-contained.
See original GitHub issueA source of confusion by people the Gitter room is the interaction between the global aws-cdk
binary and project-level dependencies. Systems like create-react-app or Next.js create builds that are entirely self-contained, requiring no global dependencies other than npm
or yarn
. This workflow is closer to most JS-based workflows today, and allows for the CDK a simple npm update
/yarn update
.
Additionally, a create-cdk-app
package would (like create-react-app or many of its kind) can be used as a template in in yarn or npx can be used to run create-x-app
, removing the need for a cdk init
-like command for Node-based projects.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Best practices for developing and deploying cloud ...
Support for CDK v1 will end entirely on June 1, 2023. ... With a self-contained construct, you can test the two kinds of...
Read more >Getting Started with Pipelines
The first step is to create the stack that will contain our pipeline. ... our actual "production" application, we want this to be...
Read more >Creating Lambda Layers with TypeScript and CDK
Now we can run cdk deploy , everything builds, and the Lambda can be ... For the Layer itself, we need it to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Roughly, yes—I’ll defer to my personal website that uses Next.js. In reality, most people would run just
npm run deploy
oryarn deploy
instead ofcdk deploy
. I’ll also respectfully disagree with assertion of “simplicity” for several reasons:package.json
might seem easy in the beginning, but makes managing multiple CDK packages independently becomes difficult.package.json
. Breaking this trend breaks user expectations.Yes, and an
index.js
. I’d suggest taking a look at Facebook’s create-react-app for a pretty solid demonstration of how this works.Hmm—I don’t think the tree of subcommands needs to flattened into the
scripts
section—just the most common ones. An alternate solution would be to only mirror the top-level subcommands and ask customers to use--
to access the subcommand.No worries! I apologize if I came off as defensive—I think we’re both approaching this in good faith.
Those are all good points, and I’m not sure how to reconcile those two goals.