MyGit
🚩收到GitHub仓库的更新通知

a-h/templ

Fork: 215 Star: 6600 (更新于 2024-05-12 17:18:01)

license: MIT

Language: Go .

A language for writing HTML user interfaces in Go.

最后发布版本: v0.2.663 ( 2024-04-10 16:59:28)

官方网址 GitHub网址

✨免费申请网站SSL证书,支持多域名和泛域名,点击查看

templ

A HTML templating language for Go that has great developer tooling.

templ

Documentation

See user documentation at https://templ.guide

Go Reference xc compatible Go Coverage Go Report Card

Tasks

build

Build a local version.

go run ./get-version > .version
cd cmd/templ
go build

nix-update-gomod2nix

gomod2nix

install-snapshot

Build and install current version.

# Remove templ from the non-standard ~/bin/templ path
# that this command previously used.
rm -f ~/bin/templ
# Clear LSP logs.
rm -f cmd/templ/lspcmd/*.txt
# Update version.
go run ./get-version > .version
# Install to $GOPATH/bin or $HOME/go/bin
cd cmd/templ && go install

build-snapshot

Use goreleaser to build the command line binary using goreleaser.

goreleaser build --snapshot --clean

generate

Run templ generate using local version.

go run ./cmd/templ generate -include-version=false

test

Run Go tests.

go run ./get-version > .version
go run ./cmd/templ generate -include-version=false
go test ./...

test-short

Run Go tests.

go run ./get-version > .version
go run ./cmd/templ generate -include-version=false
go test ./... -short

test-cover

Run Go tests.

# Create test profile directories.
mkdir -p coverage/fmt
mkdir -p coverage/generate
mkdir -p coverage/version
mkdir -p coverage/unit
# Build the test binary.
go build -cover -o ./coverage/templ-cover ./cmd/templ
# Run the covered generate command.
GOCOVERDIR=coverage/fmt ./coverage/templ-cover fmt .
GOCOVERDIR=coverage/generate ./coverage/templ-cover generate -include-version=false
GOCOVERDIR=coverage/version ./coverage/templ-cover version
# Run the unit tests.
go test -cover ./... -coverpkg ./... -args -test.gocoverdir="$PWD/coverage/unit"
# Display the combined percentage.
go tool covdata percent -i=./coverage/fmt,./coverage/generate,./coverage/version,./coverage/unit
# Generate a text coverage profile for tooling to use.
go tool covdata textfmt -i=./coverage/fmt,./coverage/generate,./coverage/version,./coverage/unit -o coverage.out
# Print total
go tool cover -func coverage.out | grep total

benchmark

Run benchmarks.

go run ./cmd/templ generate -include-version=false && go test ./... -bench=. -benchmem

fmt

Format all Go and templ code.

gofmt -s -w .
go run ./cmd/templ fmt .

lint

golangci-lint run --verbose

push-release-tag

Push a semantic version number to Github to trigger the release process.

./push-tag.sh

docs-run

Run the development server.

Directory: docs

npm run start

docs-build

Build production docs site.

Directory: docs

npm run build

最近版本更新:(数据更新于 2024-04-24 04:03:12)

2024-04-10 16:59:28 v0.2.663

2024-03-25 03:42:00 v0.2.648

2024-03-23 23:44:08 v0.2.646

2024-03-18 17:02:02 v0.2.639

2024-03-02 16:50:45 v0.2.598

2024-01-26 04:34:42 v0.2.543

2024-01-02 20:15:00 v0.2.513

2023-12-23 00:52:00 v0.2.501

2023-11-16 16:43:51 v0.2.476

2023-10-30 16:55:43 v0.2.432

主题(topics):

go, hacktoberfest, html-elements, htmx, ide-support, language-server, lsp, server-side-rendering, templating-languages

a-h/templ同语言 Go最近更新仓库

2024-05-17 04:31:35 plandex-ai/plandex

2024-05-16 16:38:24 aurora-develop/aurora

2024-05-16 04:59:25 helm/helm

2024-05-15 22:27:34 AdguardTeam/AdGuardHome

2024-05-15 21:04:45 SagerNet/sing-box

2024-05-15 15:02:59 kubernetes/kubernetes