Last active
October 27, 2024 23:39
-
-
Save Hona/04d66029cd4a5ff53ca245280bd9e5e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :: Script by Hona | |
| :: Get the latest updates from the Gist below | |
| :: https://gist.github.com/Hona/04d66029cd4a5ff53ca245280bd9e5e3 | |
| @echo off | |
| cls | |
| set "profile=PowerShell" | |
| set "apiPath=.\src\WebAPI\MyApp.WebApi" | |
| set "uiPath=.\src\WebUI\MyApp.WebUI" | |
| wt -d "%apiPath%" --title "Web API" -p "%profile%" ; ^ | |
| new-tab -d "%uiPath%" --title "Web UI" -p "%profile%" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :: Script by Hona | |
| :: Get the latest updates from the Gist below | |
| :: https://gist.github.com/Hona/04d66029cd4a5ff53ca245280bd9e5e3 | |
| @echo off | |
| cls | |
| set "profile=PowerShell" | |
| set "apiPath=.\src\WebAPI\MyApp.WebApi" | |
| set "uiPath=.\src\WebUI\MyApp.WebUI" | |
| set "delaySeconds=5" | |
| set "dotnetStartCmd=dotnet watch --non-interactive" :: Never prompt to restart on rude edits | |
| wt -d "%apiPath%" --title "Web API" -p "%profile%" %dotnetStartCmd% ; ^ | |
| new-tab -d "%uiPath%" --title "Web UI" -p "%profile%" pwsh -command Start-Sleep -Seconds %delaySeconds%\; %dotnetStartCmd% |
Author
Author
If you're using Blazor, consider this link if the hot reload doesn't work in the browser
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-watch#response-compression
Author
Update, added a script to open terminals in the directory, without running the command yet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Double click
run-watch.batCreates a window like so: