How can I watch files in rescript-vscode/analysis and rebuild?

Hi all.

I am playing with rescript-vscode extension.

rescript-vscode extension requires the analysis binary.

I am able to build analysis binary by running make in the analysis folder.

Currently, when I change something in the OCaml code of analysis I have to re-run make to build it.

Is there a way to start it in watch mode so that when I edit some OCaml code it rebuilds?

Here is the makefile https://github.com/rescript-lang/rescript-vscode/blob/master/analysis/Makefile

you can use a tool like watchman-make or nodemon

watchman-make -p 'src/**/*.ml'  -r 'make'
1 Like

Awesome. Thanks @amiralies .