From 807542000fb48bc87180d5aa8569437a767e61e3 Mon Sep 17 00:00:00 2001 From: sawka Date: Fri, 14 Nov 2025 11:38:45 -0800 Subject: [PATCH 1/3] updates for tsunami:scaffold for windows --- Taskfile.yml | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 12cb6b3de..71b85a5be 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -520,16 +520,24 @@ tasks: 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 scaffold + - mkdir -p scaffold - cp ../templates/package.json.tmpl scaffold/package.json - cd scaffold && npm install - cp -r dist scaffold/ - - mkdir scaffold/dist/tw + - mkdir -p scaffold/dist/tw - cp ../templates/app-main.go.tmpl scaffold/app-main.go - cp ../templates/tailwind.css scaffold/ - cp ../templates/gitignore.tmpl scaffold/.gitignore @@ -537,6 +545,27 @@ tasks: - 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] + shell: powershell + cmds: + - cmd: "{{.RMRF}} scaffold" + ignore_error: true + - New-Item -ItemType Directory -Force -Path scaffold + - Copy-Item -Path ../templates/package.json.tmpl -Destination scaffold/package.json + - "(Set-Location scaffold; npm install)" + - Copy-Item -Recurse -Force -Path dist -Destination scaffold/ + - New-Item -ItemType Directory -Force -Path scaffold/dist/tw + - Copy-Item -Path ../templates/app-main.go.tmpl -Destination scaffold/app-main.go + - Copy-Item -Path ../templates/tailwind.css -Destination scaffold/ + - Copy-Item -Path ../templates/gitignore.tmpl -Destination scaffold/.gitignore + - Copy-Item -Path 'src/element/*.tsx' -Destination scaffold/dist/tw/ + - Copy-Item -Path '../ui/*.go' -Destination scaffold/dist/tw/ + - Copy-Item -Path ../engine/errcomponent.go -Destination scaffold/dist/tw/ + tsunami:build: desc: Build the tsunami binary. cmds: From 3f1d2e3f5d4ed001753185b24a902ecbd685e016 Mon Sep 17 00:00:00 2001 From: sawka Date: Fri, 14 Nov 2025 12:14:57 -0800 Subject: [PATCH 2/3] add powershell cmd back in --- Taskfile.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 71b85a5be..942fb0033 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -550,21 +550,20 @@ tasks: dir: tsunami/frontend internal: true platforms: [windows] - shell: powershell cmds: - cmd: "{{.RMRF}} scaffold" ignore_error: true - - New-Item -ItemType Directory -Force -Path scaffold - - Copy-Item -Path ../templates/package.json.tmpl -Destination scaffold/package.json - - "(Set-Location scaffold; npm install)" - - Copy-Item -Recurse -Force -Path dist -Destination scaffold/ - - New-Item -ItemType Directory -Force -Path scaffold/dist/tw - - Copy-Item -Path ../templates/app-main.go.tmpl -Destination scaffold/app-main.go - - Copy-Item -Path ../templates/tailwind.css -Destination scaffold/ - - Copy-Item -Path ../templates/gitignore.tmpl -Destination scaffold/.gitignore - - Copy-Item -Path 'src/element/*.tsx' -Destination scaffold/dist/tw/ - - Copy-Item -Path '../ui/*.go' -Destination scaffold/dist/tw/ - - Copy-Item -Path ../engine/errcomponent.go -Destination scaffold/dist/tw/ + - powershell New-Item -ItemType Directory -Force -Path scaffold + - powershell Copy-Item -Path ../templates/package.json.tmpl -Destination scaffold/package.json + - powershell "(Set-Location scaffold; npm install)" + - powershell Copy-Item -Recurse -Force -Path dist -Destination scaffold/ + - powershell New-Item -ItemType Directory -Force -Path scaffold/dist/tw + - powershell Copy-Item -Path ../templates/app-main.go.tmpl -Destination scaffold/app-main.go + - powershell Copy-Item -Path ../templates/tailwind.css -Destination scaffold/ + - powershell Copy-Item -Path ../templates/gitignore.tmpl -Destination scaffold/.gitignore + - powershell Copy-Item -Path 'src/element/*.tsx' -Destination scaffold/dist/tw/ + - powershell Copy-Item -Path '../ui/*.go' -Destination scaffold/dist/tw/ + - powershell Copy-Item -Path ../engine/errcomponent.go -Destination scaffold/dist/tw/ tsunami:build: desc: Build the tsunami binary. From 102083771228777a508ea4b99cd09d89e6125cd6 Mon Sep 17 00:00:00 2001 From: sawka Date: Fri, 14 Nov 2025 12:19:31 -0800 Subject: [PATCH 3/3] try fix --- Taskfile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taskfile.yml b/Taskfile.yml index 942fb0033..8b7cf332a 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -555,7 +555,7 @@ tasks: ignore_error: true - powershell New-Item -ItemType Directory -Force -Path scaffold - powershell Copy-Item -Path ../templates/package.json.tmpl -Destination scaffold/package.json - - powershell "(Set-Location scaffold; npm install)" + - powershell -Command "Set-Location scaffold; npm install" - powershell Copy-Item -Recurse -Force -Path dist -Destination scaffold/ - powershell New-Item -ItemType Directory -Force -Path scaffold/dist/tw - powershell Copy-Item -Path ../templates/app-main.go.tmpl -Destination scaffold/app-main.go