jeffbski / wait-on

wait-on is a cross-platform command line utility and Node.js API which will wait for files, ports, sockets, and http(s) resources to become available
MIT License
1.86k stars 79 forks source link

Could it wait until a directory contains files i.e. not empty? #96

Open bytrangle opened 3 years ago

bytrangle commented 3 years ago

I want a build command to only run until a subdirectory contains files. Is it possible with wait-on? Here is what worked:

"scripts" : {
  "start:clipper": "wait-on popup/build/js && npm run watch_clipper"
}

Hower, this didn't work:

"scripts" : {
  "start:clipper": "wait-on popup/build/* && npm run watch_clipper"
}

Even though the first one works, it's a little inflexible because the content of popup/build may change and no longer contains a js subdirectory.

jeffbski commented 3 years ago

We haven't built that feature in yet. It might be possible.