Skip to content

Commit 92b5c2d

Browse files
campionfellinmergify[bot]
authored andcommitted
fix(cdk-dasm): update README and fix small typo (#3565)
Signed-off-by: campionfellin <campionfellin@gmail.com>
1 parent db7dc2e commit 92b5c2d

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

packages/cdk-dasm/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,17 @@ For example, given:
110110
The output will be:
111111

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

115+
import { Stack, StackProps, Construct, Fn } from '@aws-cdk/core';
116+
import sns = require('@aws-cdk/aws-sns');
117+
118+
export class MyStack extends Stack {
119+
constructor(scope: Construct, id: string, props: StackProps = {}) {
120+
super(scope, id, props);
121+
new sns.CfnTopic(this, 'MyTopic', {
122+
displayName: "YoTopic",
123+
});
124+
}
125+
}
114126
```

packages/cdk-dasm/lib/dasm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export async function dasmTypeScript(template: Template, options: DisassemblerOp
4646
const timestamp = options.timestamp !== undefined ? options.timestamp : true;
4747
const suffix = timestamp ? `at ${new Date().toISOString()}` : '';
4848

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

5252
//

packages/cdk-dasm/test/__snapshots__/dasm.test.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

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

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

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

0 commit comments

Comments
 (0)