Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 0 additions & 157 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ tasks:
deps:
- npm:install
- build:backend
- build:tsunamiscaffold
env:
WAVETERM_ENVFILE: "{{.ROOT_DIR}}/.env"
WCLOUD_PING_ENDPOINT: "https://ping-dev.waveterm.dev/central"
Expand Down Expand Up @@ -129,7 +128,6 @@ tasks:
- clean
- npm:install
- build:backend
- build:tsunamiscaffold

build:frontend:dev:
desc: Build the frontend in development mode.
Expand All @@ -153,9 +151,6 @@ tasks:
- pkg/**/*.go
- pkg/**/*.sh
- cmd/**/*.go
- tsunami/go.mod
- tsunami/go.sum
- tsunami/**/*.go
- package.json

build:schema:
Expand Down Expand Up @@ -185,7 +180,6 @@ tasks:
- "pkg/**/*.go"
- "pkg/**/*.json"
- "pkg/**/*.sh"
- tsunami/**/*.go
- package.json
generates:
- dist/bin/wavesrv.*
Expand Down Expand Up @@ -214,7 +208,6 @@ tasks:
- "pkg/**/*.go"
- "pkg/**/*.json"
- "pkg/**/*.sh"
- "tsunami/**/*.go"
generates:
- dist/bin/wavesrv.*

Expand All @@ -233,7 +226,6 @@ tasks:
- "pkg/**/*.go"
- "pkg/**/*.json"
- "pkg/**/*.sh"
- "tsunami/**/*.go"
generates:
- dist/bin/wavesrv.x64.exe

Expand Down Expand Up @@ -345,21 +337,6 @@ tasks:
cmd: (CGO_ENABLED=0 GOOS={{.GOOS}} GOARCH={{.GOARCH}} go build -ldflags="-s -w -X main.BuildTime=$({{.DATE}} +'%Y%m%d%H%M') -X main.WaveVersion={{.VERSION}}" -o dist/bin/wsh-{{.VERSION}}-{{.GOOS}}.{{.NORMALIZEDARCH}}{{.EXT}} cmd/wsh/main-wsh.go)
internal: true

build:tsunamiscaffold:
desc: Build and copy tsunami scaffold to dist directory.
cmds:
- cmd: "{{.RMRF}} dist/tsunamiscaffold"
ignore_error: true
- task: copyfiles:'tsunami/frontend/scaffold':'dist/tsunamiscaffold'
- cmd: '{{if eq OS "windows"}}powershell -NoProfile -NonInteractive Copy-Item -Path tsunami/templates/empty-gomod.tmpl -Destination dist/tsunamiscaffold/go.mod{{else}}cp tsunami/templates/empty-gomod.tmpl dist/tsunamiscaffold/go.mod{{end}}'
deps:
- tsunami:scaffold
sources:
- "tsunami/frontend/dist/**/*"
- "tsunami/templates/**/*"
generates:
- "dist/tsunamiscaffold/**/*"

generate:
desc: Generate Typescript bindings for the Go backend.
cmds:
Expand Down Expand Up @@ -520,140 +497,6 @@ tasks:
- cmd: '{{.RMRF}} "dist"'
ignore_error: true

tsunami:demo:todo:
desc: Run the tsunami todo demo application
cmd: go run demo/todo/*.go
dir: tsunami
env:
TSUNAMI_LISTENADDR: "localhost:12026"

tsunami:frontend:dev:
desc: Run the tsunami frontend vite dev server
cmd: npm run dev
dir: tsunami/frontend

tsunami:frontend:build:
desc: Build the tsunami frontend
cmd: npm run build
dir: tsunami/frontend

tsunami:frontend:devbuild:
desc: Build the tsunami frontend in development mode (with source maps and symbols)
cmd: npm run build:dev
dir: tsunami/frontend

tsunami:scaffold:
desc: Build scaffold for tsunami frontend development
deps:
- tsunami:frontend:build
cmds:
- task: tsunami:scaffold:internal

tsunami:devscaffold:
desc: Build scaffold for tsunami frontend development (with source maps and symbols)
deps:
- tsunami:frontend:devbuild
cmds:
- task: tsunami:scaffold:internal

tsunami:scaffold:packagejson:
desc: Create package.json for tsunami scaffold using npm commands
dir: tsunami/frontend/scaffold
cmds:
- cmd: rm -f package.json
platforms: [darwin, linux]
ignore_error: true
- cmd: powershell -NoProfile -NonInteractive -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path package.json"
platforms: [windows]
ignore_error: true
- npm --no-workspaces init -y --init-license Apache-2.0
- npm pkg set name=tsunami-scaffold
- npm pkg delete author
- npm pkg set author.name="Command Line Inc"
- npm pkg set author.email="info@commandline.dev"
- npm --no-workspaces install tailwindcss@4.1.13 @tailwindcss/cli@4.1.13

tsunami:scaffold:internal:
desc: Internal task to create scaffold directory structure
internal: true
cmds:
- task: tsunami:scaffold:internal:unix
- task: tsunami:scaffold:internal:windows

tsunami:scaffold:internal:unix:
desc: Internal task to create scaffold directory structure (Unix)
dir: tsunami/frontend
internal: true
platforms: [darwin, linux]
cmds:
- cmd: "{{.RMRF}} scaffold"
ignore_error: true
- mkdir -p scaffold
- cp ../templates/package.json.tmpl scaffold/package.json
- cd scaffold && npm install
- mv scaffold/node_modules scaffold/nm
- cp -r dist scaffold/
- mkdir -p scaffold/dist/tw
- cp ../templates/*.go.tmpl scaffold/
- cp ../templates/tailwind.css scaffold/
- cp ../templates/gitignore.tmpl scaffold/.gitignore
- cp src/element/*.tsx scaffold/dist/tw/
- cp ../ui/*.go scaffold/dist/tw/
- cp ../engine/errcomponent.go scaffold/dist/tw/

tsunami:scaffold:internal:windows:
desc: Internal task to create scaffold directory structure (Windows)
dir: tsunami/frontend
internal: true
platforms: [windows]
cmds:
- cmd: "{{.RMRF}} scaffold"
ignore_error: true
- powershell -NoProfile -NonInteractive New-Item -ItemType Directory -Force -Path scaffold
- powershell -NoProfile -NonInteractive Copy-Item -Path ../templates/package.json.tmpl -Destination scaffold/package.json
- powershell -NoProfile -NonInteractive -Command "Set-Location scaffold; npm install"
- powershell -NoProfile -NonInteractive Move-Item -Path scaffold/node_modules -Destination scaffold/nm
- powershell -NoProfile -NonInteractive Copy-Item -Recurse -Force -Path dist -Destination scaffold/
- powershell -NoProfile -NonInteractive New-Item -ItemType Directory -Force -Path scaffold/dist/tw
- powershell -NoProfile -NonInteractive Copy-Item -Path '../templates/*.go.tmpl' -Destination scaffold/
- powershell -NoProfile -NonInteractive Copy-Item -Path ../templates/tailwind.css -Destination scaffold/
- powershell -NoProfile -NonInteractive Copy-Item -Path ../templates/gitignore.tmpl -Destination scaffold/.gitignore
- powershell -NoProfile -NonInteractive Copy-Item -Path 'src/element/*.tsx' -Destination scaffold/dist/tw/
- powershell -NoProfile -NonInteractive Copy-Item -Path '../ui/*.go' -Destination scaffold/dist/tw/
- powershell -NoProfile -NonInteractive Copy-Item -Path ../engine/errcomponent.go -Destination scaffold/dist/tw/

tsunami:build:
desc: Build the tsunami binary.
cmds:
- cmd: rm -f bin/tsunami*
platforms: [darwin, linux]
ignore_error: true
- cmd: powershell -NoProfile -NonInteractive -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path bin/tsunami*"
platforms: [windows]
ignore_error: true
- mkdir -p bin
- cd tsunami && go build -ldflags "-X main.BuildTime=$({{.DATE}} +'%Y%m%d%H%M') -X main.TsunamiVersion={{.VERSION}}" -o ../bin/tsunami{{exeExt}} cmd/main-tsunami.go
sources:
- "tsunami/**/*.go"
- "tsunami/go.mod"
- "tsunami/go.sum"
generates:
- "bin/tsunami{{exeExt}}"

tsunami:clean:
desc: Clean tsunami frontend build artifacts
dir: tsunami/frontend
cmds:
- cmd: "{{.RMRF}} dist"
ignore_error: true
- cmd: "{{.RMRF}} scaffold"
ignore_error: true

godoc:
desc: Start the Go documentation server for the root module
cmd: $(go env GOPATH)/bin/pkgsite -http=:6060

tsunami:godoc:
desc: Start the Go documentation server for the tsunami module
cmd: $(go env GOPATH)/bin/pkgsite -http=:6060
dir: tsunami
Loading