manGoweb / mango-cli

A project scaffolding and build tool to accelerate your development
http://mangocli.org
MIT License
30 stars 9 forks source link

WSL watch mode compatibility #296

Closed enzy closed 5 years ago

enzy commented 5 years ago
enzy commented 5 years ago

Related behavior can be achieved also with is-docker

FilipChalupa commented 5 years ago

:top: :+1:

FilipChalupa commented 5 years ago

Hmm, on some projects it makes my PC very hot even when idle. 😄🔥 Almost all 16 cores utilized.

image

This PR has been running in dev mode (mango dev) during the red part, mango-cli@3.2.0 during the green.

enzy commented 5 years ago

We may also try to combine it with limited watch scope (only src_dir) instead of working directory. But the CPU usage is the downside of a polling watch strategy.

enzy commented 5 years ago

A. Introduced config.chokidar for custom watcher options (via mango.local.yaml). B. We still need to watch current working directory because of dist_folder and extra watched files from project config. C. There is no easy way how to detect type of watching of files (either inside VM or mounted from Windows host). The situation is even more complicated when we consider WSL 1 and WSL 2.