July 2023
Use watchexec To Run Commands When Files Change
NOTE: I added `-r` to restart the process if it's still running. Need to test to verify that's working as expected.
This top one is my working sample as of May 2024 (but it still seems flaky a little)
#!/bin/bash
Sometimes you can't go all the way into a directory? which is weird, I had to use this apprahc instead of setting the origin for example-site in the following
#!/bin/bash
TODO: Add osascript for display to notification center
Notes
-
--debounceis an option. Defaults to 50m -
--project-originneed to use when you're not in the current dir -
-wwhat to watch..will watch the entire dir. TBD if that's recursive -
--no-metawhich prevents events for firing for metadata changes and only fires them for: 'create', 'remove', 'rename', 'modify', -
--emit-events-tosee docs for now
end of line