Chokidar: Chokidar for Deno?

Created on 10 Mar 2020  路  7Comments  路  Source: paulmillr/chokidar

Is there any plan?

Most helpful comment

I've made a fork and am working on getting chokidar working on deno. What's up on deno.land/x right now does NOT work, but it should not be too difficult to fix up the imports. (Hopefully not famous last words!)

All 7 comments

Sure, contributions welcome

btw deno got his own watch implementation

https://deno.land/typedoc/index.html#watchfs

Node had native watch for a long time - doesn鈥檛 mean it鈥檚 not shitty.

Closed by mistake!

chokidar is powerful than node's watch, thought what about deno

thanks

I've made a fork and am working on getting chokidar working on deno. What's up on deno.land/x right now does NOT work, but it should not be too difficult to fix up the imports. (Hopefully not famous last words!)

Okay, following up to myself, this is mostly a pretty straightforward job and I've got good progress thanks to esm.sh, BUT...

Deno doesn't support native-code imports, so I'm pretty much dead in the water pulling in the fsevents package which contains C code. I think the way to address this is to write a Deno plugin and then use that somehow, but that would involve either rewriting that program in Rust, or rewriting the C to use Rust bindings, neither of which I'm up for.

Do people think it's worth me finishing this without MacOS fsevents? Chokidar would have to fall back to polling mode on that platform, which would kinda suck.

Alternatively, Deno now has its own Deno.watchFs which I could try to leverage instead, but it doesn't provide all the same functionality so things like awaitWriteFinish might be a little problematic, and other fields would be missing in the event object.

see if deno.watchFs is good enough. if it's shitty like its node.js counterpart, any kind of port would be welcome.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AdaRoseCannon picture AdaRoseCannon  路  3Comments

ORESoftware picture ORESoftware  路  6Comments

paulmillr picture paulmillr  路  4Comments

Pomax picture Pomax  路  3Comments

yebrahim picture yebrahim  路  4Comments