forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(init-templates): numerous fixes and additions to the sample-app i…
…nit templates (aws#5119) * fix: update init templates for csharp and java * remove extra space * switch to positive assertion * revisions to sample-app inits * further improve init template alignment * fixup fsharp templates * remove .ionide directory * add fix for aws#5130 Fixes aws#5130 * comment out Roslyn analyzers dependency * complete integration tests up * fixup python test * update java main method signature to use String[] args * adding final in main method for consistency with rest of java template * update READMEs for java init templates * update READMEs for C# and F# init templates * update app READMEs for JavaScript, TypeScript, Python * update sample-app READMEs for all supported languages * updating description of sample-apps for all languages in README * updating README for lib
- Loading branch information
1 parent
bbd7637
commit 02c3b05
Showing
65 changed files
with
872 additions
and
252 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
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
1 change: 1 addition & 0 deletions
1
packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0026:Possible unassigned object created by 'new'", Justification = "Constructs add themselves to the scope in which they are created")] |
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 was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
packages/aws-cdk/lib/init-templates/app/fsharp/cdk.template.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"app": "dotnet run -p src/%name.PascalCased%/%name.PascalCased%.fsproj" | ||
} |
File renamed without changes.
22 changes: 22 additions & 0 deletions
22
...k/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp3.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="%name.PascalCased%Stack.fs" /> | ||
<Compile Include="Program.fs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<!-- CDK Construct Library dependencies --> | ||
<PackageReference Include="Amazon.CDK" Version="%cdk-version%-devpreview" /> | ||
|
||
<!-- jsii Roslyn analyzers (un-comment to obtain compile-time checks for missing required props | ||
<PackageReference Include="Amazon.Jsii.Analyzers" Version="*" PrivateAssets="all" /> | ||
--> | ||
</ItemGroup> | ||
|
||
</Project> |
8 changes: 8 additions & 0 deletions
8
.../lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace %name.PascalCased% | ||
|
||
open Amazon.CDK | ||
|
||
type %name.PascalCased%Stack(scope, id, props) as this = | ||
inherit Stack(scope, id, props) | ||
|
||
// The code that defines your stack goes here |
11 changes: 11 additions & 0 deletions
11
packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/Program.template.fs
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
open Amazon.CDK | ||
open %name.PascalCased% | ||
|
||
[<EntryPoint>] | ||
let main _ = | ||
let app = App(null) | ||
|
||
%name.PascalCased%Stack(app, "%name.PascalCased%Stack", StackProps()) |> ignore | ||
|
||
app.Synth() |> ignore | ||
0 |
17 changes: 0 additions & 17 deletions
17
packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/HelloConstruct.fs
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/HelloStack.fs
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/Program.fs
This file was deleted.
Oops, something went wrong.
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
9 changes: 7 additions & 2 deletions
9
...lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java
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 was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
packages/aws-cdk/lib/init-templates/lib/typescript/README.template.md
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Welcome to your CDK TypeScript Construct Library project! | ||
|
||
You should explore the contents of this project. It demonstrates a CDK Construct Library that includes a construct (`%name.PascalCased%`) | ||
which contains an Amazon SNS topic that is subscribed to an Amazon SQS queue. | ||
|
||
The construct defines an interface (`%name.PascalCased%Props`) to configure the visibility timeout of the queue. | ||
|
||
## Useful commands | ||
|
||
* `npm run build` compile typescript to js | ||
* `npm run watch` watch for changes and compile | ||
* `npm run test` perform the jest unit tests |
13 changes: 6 additions & 7 deletions
13
packages/aws-cdk/lib/init-templates/sample-app/csharp/README.template.md
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
36 changes: 0 additions & 36 deletions
36
...emplates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Construct.template.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.