-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: make examples in
aws-ec2
package compilable
Using the new "rosetta" sample compiler from aws/jsii#925, introduce fixtures and fix up sample code to make all examples in the `aws-ec2` package compile. This serves as a demonstration of how to set up fixtures and how to write the examples. Need to reverse the order between `@example` and `@attribute`; because of a bug in the TypeScript compiler, it will think a new tag starts if a `@` comes up in the example. This means that we cannot type `import s3 = require('@aws-cdk/aws-s3');` in examples (it would parse `@aws = -cdk/aws-s3');`. To fix that, we absorb non-recognized tags that follow an `@example` back into the example body, but since `@attribute` is non-recognized, we'd absorb that as well. The solution is to have `@example` as the last tag. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* <!-- Please read the contribution guidelines and follow the pull-request checklist: https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md -->
- Loading branch information
1 parent
1b25a4b
commit 7885025
Showing
13 changed files
with
220 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ coverage/ | |
cdk.context.json | ||
.cdk.staging/ | ||
cdk.out/ | ||
|
||
*.tabl.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.