Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"analyses": {
"QF1003": false
},
"directoryFilters": ["-tsunami/frontend/scaffold"]
"directoryFilters": ["-tsunami/frontend/scaffold", "-dist"]
},
"tailwindCSS.lint.suggestCanonicalClasses": "ignore"
}
20 changes: 20 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ tasks:
deps:
- npm:install
- build:backend
- build:tsunamiscaffold
env:
WAVETERM_ENVFILE: "{{.ROOT_DIR}}/.env"
WCLOUD_ENDPOINT: "https://api-dev.waveterm.dev/central"
Expand Down Expand Up @@ -115,6 +116,7 @@ tasks:
- clean
- npm:install
- build:backend
- build:tsunamiscaffold

build:frontend:dev:
desc: Build the frontend in development mode.
Expand Down Expand Up @@ -299,6 +301,20 @@ 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'
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 @@ -513,9 +529,13 @@ tasks:
- cp ../templates/package.json.tmpl scaffold/package.json
- cd scaffold && npm install
- cp -r dist scaffold/
- mkdir scaffold/dist/tw
- cp ../templates/app-main.go.tmpl scaffold/app-main.go
- 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:build:
desc: Build the tsunami binary.
Expand Down
1 change: 1 addition & 0 deletions electron-builder.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const config = {
asarUnpack: [
"dist/bin/**/*", // wavesrv and wsh binaries
"dist/schema/**/*", // schema files for Monaco editor
"dist/tsunamiscaffold/**/*", // tsunami scaffold files
],
mac: {
target: [
Expand Down
Loading
Loading