Skip to content

Commit

Permalink
fix(cdk-dasm): update README and fix small typo (#3565)
Browse files Browse the repository at this point in the history
Signed-off-by: campionfellin <[email protected]>
  • Loading branch information
campionfellin authored and mergify[bot] committed Aug 7, 2019
1 parent db7dc2e commit 92b5c2d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
12 changes: 12 additions & 0 deletions packages/cdk-dasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,17 @@ For example, given:
The output will be:

```ts
// generated by cdk-dasm at 2019-08-07T02:52:01.561Z

import { Stack, StackProps, Construct, Fn } from '@aws-cdk/core';
import sns = require('@aws-cdk/aws-sns');

export class MyStack extends Stack {
constructor(scope: Construct, id: string, props: StackProps = {}) {
super(scope, id, props);
new sns.CfnTopic(this, 'MyTopic', {
displayName: "YoTopic",
});
}
}
```
2 changes: 1 addition & 1 deletion packages/cdk-dasm/lib/dasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function dasmTypeScript(template: Template, options: DisassemblerOp
const timestamp = options.timestamp !== undefined ? options.timestamp : true;
const suffix = timestamp ? `at ${new Date().toISOString()}` : '';

code.line(`// generated by cdk-dasm${suffix}`);
code.line(`// generated by cdk-dasm ${suffix}`);
code.line();

//
Expand Down
6 changes: 3 additions & 3 deletions packages/cdk-dasm/test/__snapshots__/dasm.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`basic test 1`] = `
"// generated by cdk-dasm
"// generated by cdk-dasm
import { Stack, StackProps, Construct, Fn } from '@aws-cdk/core';
import sns = require('@aws-cdk/aws-sns');
Expand All @@ -18,7 +18,7 @@ export class MyStack extends Stack {
`;

exports[`bucket-and-key 1`] = `
"// generated by cdk-dasm
"// generated by cdk-dasm
import { Stack, StackProps, Construct, Fn } from '@aws-cdk/core';
import kms = require('@aws-cdk/aws-kms');
Expand Down Expand Up @@ -98,7 +98,7 @@ export class MyStack extends Stack {
`;

exports[`no props 1`] = `
"// generated by cdk-dasm
"// generated by cdk-dasm
import { Stack, StackProps, Construct, Fn } from '@aws-cdk/core';
import s3 = require('@aws-cdk/aws-s3');
Expand Down

0 comments on commit 92b5c2d

Please sign in to comment.