Open Download opened 8 years ago
Yeah I couldn't find a package that would wait for non-existent files to appear, they all just watched existing files or directories only... So I created one.
And wait-run only runs just once and then exits. None of the other watchers has this option.
By the way, I did start attempting to listen to the dev server, but apparently Webpack HMR communication to Node is file-based. So there was no dev server with a port listening. Only an initial server.js and later hash.json updates are outputted, and "webpack/hot/poll" then goes looking for hash.json update files to require().
So in the starterkit wait-run awaits the initial server.js to change or appear.
Yes. I was actually listening for the dev server to start serving files to the client before starting the server... It sorta worked out but it doesn't really make sense as a solution.
I hope you don't mind but I'm changing your utitlity around a little bit and re-releasing it as just-wait... I don't even want it to run that single command... I do that myself. I now use it like this:
just-wait -p somefile.js && echo Go!
Also, I added options for a timeout and some logging and of course options to suppress that logging. I forked your project because I felt the changes would maybe be too radical for you :) If you'd like to merge them instead just let me know. I put you down as the author of the new project and myself as a collaborator...
Oh please don't. It's your idea and your work, and if you mention someone it should really be @queckezz.
By the way, I like the unix-y concept of just-wait
and if it's possible, I'll use it for the starterkit instead. :+1:
I'd be honored if you would use it for the starterkit! :+1:
I'll add @queckezz to the credits :)
I've dropped a mention of our projects in @queckezz issue list. Specifically I am asking him if it's ok if users of just-wait
take their pick from any of the licenses. We are all three using different licenses and that's ok but it may be confusing for the user.
So I'd like to ask you as well... Is it ok for users to take their pick from MIT / BSD / CC licenses?
Hah! I saw you added
wait-run
to thereact-isomorphic-starterkit
.. quickly checked it and realized it was a utility to wait for a file to change (which makes a lot more sense then waiting for the dev server btw, was a brain fart of mine :), however, I didn't notice you had created this package as well...I find it really cool the way you help out the entire community. I am now using this package as well, so THANK YOU!!