mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
+templ.guide
This commit is contained in:
parent
ed1063840d
commit
ee091cb9cd
2 changed files with 35 additions and 0 deletions
5
projects/templ.guide/hello.templ
Normal file
5
projects/templ.guide/hello.templ
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
templ hello(name string) {
|
||||||
|
<div>Hello, { name }</div>
|
||||||
|
}
|
30
projects/templ.guide/package.yml
Normal file
30
projects/templ.guide/package.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/a-h/templ/archive/refs/tags/v{{version}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: a-h/templ
|
||||||
|
strip: /^v/
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
go.dev: ^1.20
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
LDFLAGS:
|
||||||
|
- -extldflags=-static
|
||||||
|
- -w
|
||||||
|
- -s
|
||||||
|
script:
|
||||||
|
- go build -v -ldflags="$LDFLAGS" -o templ ./cmd/templ
|
||||||
|
- mkdir -p "{{ prefix }}"/bin
|
||||||
|
- mv templ "{{ prefix }}"/bin
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/templ
|
||||||
|
|
||||||
|
test:
|
||||||
|
script:
|
||||||
|
- test "$(templ --version)" = {{version}}
|
||||||
|
- templ generate
|
||||||
|
- test -f hello_templ.go
|
Loading…
Reference in a new issue