#Chaining Tasks and using --watch
10 messages · Page 1 of 1 (latest)
You could try out pup with the watch functionality and a chained command (never try chaining commands in pup, open an issue if it doesn't work)
https://github.com/Hexagon/pup/blob/main/docs/examples/watcher/pup.jsonc
Manual at https://hexagon.github.io/pup
Config should be something like this
{
"processes": [
{
"id": "demo-watch",
"cmd": ["deno", "run", "bundler.js", "&&", "deno", "run", "script.js"],
"autostart": true, // When watching, we want autostart
"restart": "always", // The process will just be killed when a file change is detected, configure to always restart
"restartDelayMs": 1000, // Default is 10000, which is too long for development, set this to 1000
"watch": ["./"] // Watch the entire current directory
}
]
}
This looks interesting. I will check it out - thanks
I was hoping there would be a more straight forward Deno way to do this though...
Pup ^
It could be done with a one liner too (if it works at all right now), check out the "single command usage" section of https://hexagon.github.io/pup/usage.html#single-command-usage
If you want to avoid installing, you can run pup directly from the deno.land url and put everything in a deno task "deno task up", which would make it very slim
Nope, chaining does not work using a single process in pup. Will have to work on that
All good. I ended up compiling esbuild and calling it when initialising the app with Deno.run. I will come back and look at pup when the project goes into production. Thank you for your help
🙏
I have a dev server that might interest you.
https://github.com/nhrones/HotServe