mirror of
https://git.freecumextremist.com/grumbulon/pomme.git
synced 2024-11-24 02:13:46 +00:00
feat(frontend): workspaces (#13)
Co-authored-by: Sam Therapy <sam@samtherapy.net> Reviewed-on: https://git.freecumextremist.com/grumbulon/pomme/pulls/13
This commit is contained in:
parent
0e09ff1856
commit
b5599eb055
5 changed files with 29 additions and 10 deletions
28
Makefile
28
Makefile
|
@ -5,15 +5,33 @@ PROG ?= pomme
|
|||
GO_SOURCES ?= $(shell find . -name "*.go" -type f ! -name '*_test*')
|
||||
GO_TEST_SOURCES ?= $(shell find . -name "*_test.go" -type f)
|
||||
|
||||
NODE_SOURCES ?= $(shell find ./frontend -type d \( -name node_modules -o -name .svelte-kit -o -name tests \) -prune -o -name '*.ts' -o -name '*.js' -o -name '*.html' -o -name '*.svelte' -o -name '*.json' -print)
|
||||
|
||||
all: frontend backend
|
||||
|
||||
.PHONY: frontend
|
||||
frontend:
|
||||
go generate ./...
|
||||
frontend: $(NODE_SOURCES)
|
||||
pnpm -F frontend build
|
||||
|
||||
backend: $(GO_SOURCES)
|
||||
go build ./cmd/pomme
|
||||
.PHONY: backend
|
||||
$(PROG): $(GO_SOURCES)
|
||||
go build $(GOFLAGS) ./cmd/pomme
|
||||
backend: $(PROG)
|
||||
|
||||
.PHONY: format format-frontend format-backend
|
||||
format: format-frontend format-backend
|
||||
|
||||
format-frontend:
|
||||
pnpm -F frontend format
|
||||
|
||||
format-backend:
|
||||
gofmt -w -s .
|
||||
|
||||
.PHONY: lint lint-frontend lint-backend
|
||||
lint: lint-frontend lint-backend
|
||||
|
||||
lint-frontend:
|
||||
pnpm -F frontend lint
|
||||
|
||||
lint-backend:
|
||||
golangci-lint run --timeout=5m --out-format colored-line-number:stdout
|
||||
.PHONY: lint-backend
|
|
@ -12,8 +12,7 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
//go:generate pnpm i
|
||||
//go:generate pnpm run build
|
||||
//go:generate npm run build
|
||||
//go:embed all:build
|
||||
var files embed.FS
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
export const prerender = true
|
||||
export const prerender = true;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<h1>Welcome to SvelteKit</h1>
|
||||
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
|
||||
<h1>Welcome to pomme!</h1>
|
||||
<p>There will be something here one day :)</p>
|
||||
|
|
2
pnpm-workspaces.yaml
Normal file
2
pnpm-workspaces.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
workspaces:
|
||||
- "frontend"
|
Loading…
Reference in a new issue