`npm run sync` in web/ copies the build output (web/dist, from npm run build) to internal/frontend/dist, which the binary embeds. Go can't embed from outside the package's directory (web/ is also outside the Go module), hence the copy. Only dist/.gitkeep is committed, so a fresh clone still compiles, and a binary built without syncing first serves no frontend. job-search serve serves server.frontend.dir if it is set, or else the embedded build, or warns that there is no frontend. scripts/build.sh builds and syncs the frontend before building, running npm ci first for a release or when web/node_modules is missing.
47 lines
854 B
Plaintext
47 lines
854 B
Plaintext
# ---> Go
|
|
# If you prefer the allow list template instead of the deny list, see community template:
|
|
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
|
#
|
|
# Binaries for programs and plugins
|
|
*.exe
|
|
*.exe~
|
|
*.dll
|
|
*.so
|
|
*.dylib
|
|
|
|
# Test binary, built with `go test -c`
|
|
*.test
|
|
|
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
|
*.out
|
|
|
|
# Dependency directories (remove the comment below to include it)
|
|
# vendor/
|
|
|
|
# Go workspace file
|
|
go.work
|
|
go.work.sum
|
|
|
|
# env file
|
|
.env
|
|
|
|
# config file(s)
|
|
config.yaml
|
|
config.json
|
|
|
|
# Visual Studio Code
|
|
.vscode/*
|
|
|
|
# Build directory
|
|
build/
|
|
|
|
# Release directory
|
|
release/
|
|
|
|
mock-data/
|
|
|
|
# The frontend's build output, copied by npm run sync in web/ for embedding.
|
|
# .gitkeep is kept, as Go can't embed a missing directory.
|
|
internal/frontend/dist/*
|
|
!internal/frontend/dist/.gitkeep
|