Skip to content

Commit

Permalink
Add README.md to typescript init templates
Browse files Browse the repository at this point in the history
Those files provide useful commands that will be displayed in the
terminal after a successful run of `cdk init`.
  • Loading branch information
RomainMuller committed Jun 15, 2018
1 parent 6f30057 commit 7ac129d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/aws-cdk/lib/init-templates/app/cdk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"app": "node bin/%name%.js"
}
11 changes: 11 additions & 0 deletions packages/aws-cdk/lib/init-templates/app/typescript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Useful commands
```shell
npm run prepare # Compile the source code

This comment has been minimized.

Copy link
@eladb

eladb Jun 17, 2018

Contributor

Don't we want to instruct people on using cdk-npm? That's our chance!

npm run watch # Watch for file changes and compile automatically

cdk synth # See the CloudFormation template for this app
cdk diff # See the differences between this app and what is deployed
cdk deploy # Deploy this app to your AWS account

cdk-beta-npm install # Install new CDK dependencies
```
7 changes: 7 additions & 0 deletions packages/aws-cdk/lib/init-templates/lib/typescript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Useful commands
```shell
npm run prepare # Compile the source code
npm run watch # Watch for file changes and compile automatically

cdk-beta-npm install # Install new CDK dependencies
```
3 changes: 0 additions & 3 deletions packages/aws-cdk/lib/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@ async function postInstallTypescript() {
if (await execCdkBetaNpm('install') !== 0) {
throw new Error('cdk-beta-npm install failed!');
}
print(`Use ${colors.blue('cdk synth')} to see the generated CloudFormation template`);
print(`Use ${colors.blue('cdk deploy')} to deploy the application to CloudFormation`);
print(`Use ${colors.blue('cdk-beta-npm install')} instead of ${colors.blue('npm install')}`);
}

/**
Expand Down

0 comments on commit 7ac129d

Please sign in to comment.