refactor widget
This issue comes from the #321 (closed) branch. (commit 3857eff0)
Saving the widget javascript file as a real file largely improves the development facility on this script. Enabling in editor completion, eslint and prettier to check this script. It should have little to no impact on the perfomance (bc the content is saved in memory after two file system read. Instead of loading in the memory the script as a string directly at startup)
I decided to split this in a separate issue (and branch) to be able to rebase it on the future developments