diff --git a/packages/cdk-dasm/README.md b/packages/cdk-dasm/README.md index 6b295025c32e2..9e59f9aada15a 100644 --- a/packages/cdk-dasm/README.md +++ b/packages/cdk-dasm/README.md @@ -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", + }); + } +} ``` \ No newline at end of file diff --git a/packages/cdk-dasm/lib/dasm.ts b/packages/cdk-dasm/lib/dasm.ts index 90abd35b97a77..bf0327f896cf2 100644 --- a/packages/cdk-dasm/lib/dasm.ts +++ b/packages/cdk-dasm/lib/dasm.ts @@ -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(); // diff --git a/packages/cdk-dasm/test/__snapshots__/dasm.test.js.snap b/packages/cdk-dasm/test/__snapshots__/dasm.test.js.snap index de3eca2ee5541..4416e8843dff0 100644 --- a/packages/cdk-dasm/test/__snapshots__/dasm.test.js.snap +++ b/packages/cdk-dasm/test/__snapshots__/dasm.test.js.snap @@ -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'); @@ -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'); @@ -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');