-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
set -o errexit -o pipefail | ||
|
||
git clean -fdX | ||
|
||
yarn cache clean | ||
hugo mod clean | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{{- $path := .Get "path" -}} | ||
{{- $language := .Get "language" -}} | ||
{{- $from := .Get "from" -}} | ||
{{- $to := .Get "to" -}} | ||
{{- $program := "" -}} | ||
{{- $depfile := "" -}} | ||
{{- $deplang := "" -}} | ||
{{- if eq $language "javascript" -}} | ||
{{- $program = "index.js" -}} | ||
{{- $depfile = "package.json" -}} | ||
{{- $deplang = "json" -}} | ||
{{- else if eq $language "typescript" -}} | ||
{{- $program = "index.ts" -}} | ||
{{- $depfile = "package.json" -}} | ||
{{- $deplang = "json" -}} | ||
{{- else if eq $language "python" -}} | ||
{{- $program = "__main__.py" -}} | ||
{{- $depfile = "requirements.txt" -}} | ||
{{- $deplang = "plain" -}} | ||
{{- else if eq $language "go" -}} | ||
{{- $program = "main.go" -}} | ||
{{- $depfile = "go.mod" -}} | ||
{{- $deplang = "bash" -}} | ||
{{- else if eq $language "csharp" -}} | ||
{{- $program = "Program.cs" -}} | ||
{{- $depfile = printf "%s.csproj" (printf "%s-%s" $path $language) -}} | ||
{{- $deplang = "xml" -}} | ||
{{- else if eq $language "java" -}} | ||
{{- $program = "src/main/java/myproject/App.java" -}} | ||
{{- $depfile = "pom.xml" -}} | ||
{{- $deplang = "xml" -}} | ||
{{- else if eq $language "yaml" -}} | ||
{{- $program = "Pulumi.yaml" -}} | ||
{{- end -}} | ||
{{- $file := readFile (path.Join "static" "programs" (printf "%s-%s" $path $language) $program) -}} | ||
{{- if and (ne $from "") (ne $to "") -}} | ||
{{- $lines := split $file "\n" -}} | ||
{{- $toEnd := after (sub (int $from) 1) $lines -}} | ||
{{- $lineCount := add (sub (int $to) (int $from)) 1 -}} | ||
{{- $toTo := first $lineCount $toEnd -}} | ||
{{- delimit $toTo "\n" -}} | ||
{{- else -}} | ||
{{- $file -}} | ||
{{- end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{{ $path := .Get "path" }} | ||
{{ $languages := default "javascript,typescript,python,go,csharp,java,yaml" (.Get "languages") }} | ||
{{ $folder := path.Join "static" "programs" }} | ||
|
||
<div> | ||
<pulumi-chooser type="language" options="{{ $languages }}"></pulumi-chooser> | ||
</div> | ||
|
||
{{ range $i, $language := split $languages "," }} | ||
<div class="w-full"> | ||
<pulumi-choosable type="language" values="{{ $language }}"> | ||
<div> | ||
{{ $program := "" }} | ||
{{ $depfile := "" }} | ||
{{ $deplang := "" }} | ||
{{ if eq $language "javascript" }} | ||
{{ $program = "index.js" }} | ||
{{ $depfile = "package.json" }} | ||
{{ $deplang = "json" }} | ||
{{ else if eq $language "typescript" }} | ||
{{ $program = "index.ts" }} | ||
{{ $depfile = "package.json" }} | ||
{{ $deplang = "json" }} | ||
{{ else if eq $language "python" }} | ||
{{ $program = "__main__.py" }} | ||
{{ $depfile = "requirements.txt" }} | ||
{{ $deplang = "plain" }} | ||
{{ else if eq $language "go" }} | ||
{{ $program = "main.go" }} | ||
{{ $depfile = "go.mod" }} | ||
{{ $deplang = "bash" }} | ||
{{ else if eq $language "csharp" }} | ||
{{ $program = "Program.cs" }} | ||
{{ $depfile = printf "%s.csproj" (printf "%s-%s" $path $language) }} | ||
{{ $deplang = "xml" }} | ||
{{ else if eq $language "java" }} | ||
{{ $program = "src/main/java/myproject/App.java" }} | ||
{{ $depfile = "pom.xml" }} | ||
{{ $deplang = "xml" }} | ||
{{ else if eq $language "yaml" }} | ||
{{ $program = "Pulumi.yaml" }} | ||
{{ end }} | ||
{{ if and (ne $program "") (ne $depfile "") }} | ||
{{ $root := slice "static" "programs" (printf "%s-%s" $path $language) }} | ||
{{ $code := readFile (path.Join $root $program) }} | ||
{{ $deps := readFile (path.Join $root $depfile) }} | ||
{{ $info := os.Stat (path.Join $root) }} | ||
<div> | ||
{{ highlight $code $language }} | ||
</div> | ||
<!-- WIP: Show program dependencies. | ||
<div class="mt-0 mb-4 text-sm bg-gray-200 text-gray-700 rounded py-1 px-2 cursor-pointer"> | ||
<details> | ||
<summary>{{ $depfile }}</summary> | ||
{{ if and (ne $depfile "") (ne $deplang "") }} | ||
<div> | ||
{{ highlight $deps $deplang }} | ||
</div> | ||
{{ end }} | ||
</details> | ||
</div> | ||
--> | ||
{{ end }} | ||
</div> | ||
</pulumi-choosable> | ||
</div> | ||
{{ end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,3 @@ | ||
{{ $path := .Get "path" }} | ||
{{ $languages := .Get "languages" }} | ||
|
||
<div> | ||
<pulumi-chooser type="language" options="{{ $languages }}"></pulumi-chooser> | ||
<div class="example-registry"> | ||
<pulumi-choosable type="language" values="{{ .Get 0 }}">{{ .Inner }}</pulumi-choosable> | ||
</div> | ||
|
||
{{ range $i, $language := split $languages "," }} | ||
<div class="w-full"> | ||
<pulumi-choosable type="language" values="{{ $language }}"> | ||
<div> | ||
{{ $program := "" }} | ||
{{ if eq $language "javascript" }} | ||
{{ $program = "index.js" }} | ||
{{ else if eq $language "typescript" }} | ||
{{ $program = "index.ts" }} | ||
{{ else if eq $language "python" }} | ||
{{ $program = "__main__.py" }} | ||
{{ else if eq $language "go" }} | ||
{{ $program = "main.go" }} | ||
{{ else if eq $language "csharp" }} | ||
{{ $program = "Program.cs" }} | ||
{{ else if eq $language "java" }} | ||
{{ $program = "src/main/java/myproject/App.java" }} | ||
{{ else if eq $language "yaml" }} | ||
{{ $program = "Pulumi.yaml" }} | ||
{{ end }} | ||
{{ if ne $program "" }} | ||
{{ $code := readFile (path.Join "static" "examples" (printf "%s-%s" $path $language) $program) }} | ||
{{ highlight $code $language }} | ||
{{ end }} | ||
</div> | ||
</pulumi-choosable> | ||
</div> | ||
{{ end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="examples-registry"> | ||
<pulumi-examples>{{ .Inner }}</pulumi-examples> | ||
</div> |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: awsx-ecr-eks-deployment-service-csharp | ||
runtime: dotnet |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
name: awsx-ecr-eks-deployment-service-java | ||
runtime: java | ||
description: A minimal AWS Java Pulumi program |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: awsx-ecr-image-csharp | ||
runtime: dotnet |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: awsx-ecr-image-go | ||
runtime: go |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: awsx-ecr-image-java | ||
runtime: java |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ runtime: | |
name: nodejs | ||
options: | ||
typescript: false | ||
description: A minimal AWS JavaScript Pulumi program |