Skip to content

Commit

Permalink
fix(templates/spin.toml): skewer application name like a kebab
Browse files Browse the repository at this point in the history
Signed-off-by: Marius Kluften <marius@kluften.dev>
  • Loading branch information
brehen committed May 24, 2024
1 parent 418129a commit 4a32c32
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 12 deletions.
3 changes: 2 additions & 1 deletion templates/http-c/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
Expand All @@ -14,6 +14,7 @@ executor = { type = "wagi" }
[component.{{project-name | kebab_case}}]
source = "main.wasm"
allowed_outbound_hosts = []

[component.{{project-name | kebab_case}}.build]
command = "zig build-exe -O ReleaseSmall -target wasm32-wasi main.c -lc"
watch = ["**/*.c"]
2 changes: 1 addition & 1 deletion templates/http-empty/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
3 changes: 2 additions & 1 deletion templates/http-go/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
Expand All @@ -13,6 +13,7 @@ component = "{{project-name | kebab_case}}"
[component.{{project-name | kebab_case}}]
source = "main.wasm"
allowed_outbound_hosts = []

[component.{{project-name | kebab_case}}.build]
command = "tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go"
watch = ["**/*.go", "go.mod"]
3 changes: 2 additions & 1 deletion templates/http-grain/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
Expand All @@ -14,6 +14,7 @@ executor = { type = "wagi" }
[component.{{project-name | kebab_case}}]
source = "main.wasm"
allowed_outbound_hosts = []

[component.{{project-name | kebab_case}}.build]
command = "grain compile --release -o main.wasm main.gr"
watch = ["**/*.gr"]
2 changes: 1 addition & 1 deletion templates/http-php/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
Expand Down
3 changes: 2 additions & 1 deletion templates/http-rust/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
Expand All @@ -13,6 +13,7 @@ component = "{{project-name | kebab_case}}"
[component.{{project-name | kebab_case}}]
source = "target/wasm32-wasi/release/{{project-name | snake_case}}.wasm"
allowed_outbound_hosts = []

[component.{{project-name | kebab_case}}.build]
command = "cargo build --target wasm32-wasi --release"
watch = ["src/**/*.rs", "Cargo.toml"]
3 changes: 2 additions & 1 deletion templates/http-swift/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
Expand All @@ -14,6 +14,7 @@ executor = { type = "wagi" }
[component.{{project-name | kebab_case}}]
source = "main.wasm"
allowed_outbound_hosts = []

[component.{{project-name | kebab_case}}.build]
command = "swiftc -target wasm32-unknown-wasi main.swift -o main.wasm"
watch = ["**/*.swift"]
3 changes: 2 additions & 1 deletion templates/http-zig/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
Expand All @@ -14,6 +14,7 @@ executor = { type = "wagi" }
[component.{{project-name | kebab_case}}]
source = "main.wasm"
allowed_outbound_hosts = []

[component.{{project-name | kebab_case}}.build]
command = "zig build-exe -O ReleaseSmall -target wasm32-wasi src/main.zig"
watch = ["src/**/*.zig"]
2 changes: 1 addition & 1 deletion templates/redirect/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
Expand Down
3 changes: 2 additions & 1 deletion templates/redis-go/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
Expand All @@ -16,5 +16,6 @@ component = "{{project-name | kebab_case}}"
[component.{{project-name | kebab_case}}]
source = "main.wasm"
allowed_outbound_hosts = []

[component.{{project-name | kebab_case}}.build]
command = "tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go"
3 changes: 2 additions & 1 deletion templates/redis-rust/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
Expand All @@ -16,6 +16,7 @@ component = "{{project-name | kebab_case}}"
[component.{{project-name | kebab_case}}]
source = "target/wasm32-wasi/release/{{project-name | snake_case}}.wasm"
allowed_outbound_hosts = []

[component.{{project-name | kebab_case}}.build]
command = "cargo build --target wasm32-wasi --release"
watch = ["src/**/*.rs", "Cargo.toml"]
2 changes: 1 addition & 1 deletion templates/static-fileserver/content/spin.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spin_manifest_version = 2

[application]
name = "{{project-name}}"
name = "{{project-name | kebab_case}}"
version = "0.1.0"
authors = ["{{authors}}"]
description = "{{project-description}}"
Expand Down

0 comments on commit 4a32c32

Please sign in to comment.