wait-run

Wait for a file or directory to change then run a command

Usage no npm install needed!

<script type="module">
  import waitRun from 'https://cdn.skypack.dev/wait-run';
</script>

README

wait-run

version license installs

Wait for a file or directory to change or appear, then run a command once. The watched file or directory does not have to exist yet.

Heavily based on the wonderful watch-run by @queckezz.

Simply need to wait for a file/directory? Use just-wait by @Download which is a fork of wait-run. It allows you to chain && commands.

Installation

npm install -g wait-run

Usage

wait-run --pattern '*.*' -- say hello    # waits for any change in cwd then runs once.

License

BSD 3-Clause license. Copyright © 2016, Rick Wong. All rights reserved.