diff --git a/Taskfile.yml b/Taskfile.yml index 12cb6b3de..8b7cf332a 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,26 @@ 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] + cmds: + - cmd: "{{.RMRF}} scaffold" + ignore_error: true + - powershell New-Item -ItemType Directory -Force -Path scaffold + - powershell Copy-Item -Path ../templates/package.json.tmpl -Destination scaffold/package.json + - 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 + - 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. cmds: