KyleJuneK
Denoβ€’3y agoβ€’
3 replies
KyleJune

Using Deno.Command to run tailwindcss with watch flag not working

If I do
new Deno.Command(Deno.execPath(), {args:["run", "-A", "npm:tailwindcss", "-i", "./styles.css", "-o", "./public/styles.css", "--watch"]})
, no watching happens and the output file doesn't get updated. The npm package running doesn't seem to get the watch argument or the output anymore.

But if I run
npx tailwindcss -i ./styles.css -o ./public/styles.css --watch
, It updates the file and watches for changes based on the
tailwind.config.js
. Is this expected or am I doing something wrong? I'm just trying to spawn a process to do the same as npx. Should I just use
"npx"
instead of
Deno.execPath()
?
Was this page helpful?