Went ahead and uploaded the above example to my site to show it in action (source is available at github as usual)…
- Prod version, normal brunch compressed file: http://overminddl1.com/bucklescript/counter/prod/
- Dev version, uncompressed javascript, nicely readable to see how it compiles: http://overminddl1.com/bucklescript/counter/dev/
The above will be the newer versions as I make changes as well (‘mostly’ in sync with the github source, maybe older or newer at times).
EDIT0: I uploaded the *.js.map files too so you can see how I laid out my source tree as well and see what files made what (very in-testing experimenting, not proper setup). I need to figure out how to have brunch use the source ocaml as the map instead of the javascript…
EDIT1: Added requestAnimationFrame support, so it only updates the DOM when necessary now.