❔ Csproj Run npm command side by side with dotnet run
Hi!
How can I make csproj run
npm run build
alongside it rather than before it and then quitting?
My scripts
13 Replies
smh like
https://learn.microsoft.com/en-us/visualstudio/ide/how-to-specify-build-events-csharp?view=vs-2022 (ignore VS-specific configuration, microsoft casually stuck in 2005)
It still does not make the command persist in the background
Frankly, now the command doesn't run
(it did earlier)
wdym persist in the background
npx tailwindcss -i ./Styles/site.css -o ./wwwroot/css/site.css --watch
i.e. - listen for changes in files and generate appropriate classes in ./wwwroot/css/site.css
tailwindcss cli processing
persist as in be on another thread
so while dotnet watch
updates the html implementation, npm run build
constantly updates my css files in ./wwwroot/css/site.css
based on those changesoh wait
huh I see
so basically you need npm run build to be spinning there
yup
you could make a simple bash script if you're on linux
otherwise, not sure
windows, but can do powershell
how would i do it if csproj expects a return from exec
I'd do it entirely different then
i think it would be csproj -> powershell -> spawn powershell with script running and return
but then closing it would be another case
I'd go with script running first, then spawn
smh like
(it's pseudo but you get the point)
probably
not sure honestly, mb someone else can help
still, thank you for all of your help <3, getting rough idea, now gotta try to execute it
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.