thi-ng / ws-ldn-11

High Performance ClojureScript - WebGL, WebRTC, Web workers & asm.js
http://workshop.thi.ng
Apache License 2.0
10 stars 3 forks source link

port to cljs.edn #1

Open thheller opened 8 years ago

thheller commented 8 years ago

DISCLAIMER: This is just a proof of concept and very very alpha.

I saw your blog post on Web Workers and thought I'd mention I tool I'm working on. While it is currently just a proof a concept it perfectly matches what you were trying to do and I absolutely agree.

The basic gist is that you create a cljs.edn config file to describe your CLJS build.

You then run: lein run -m shadow.devtools.cli/dev demo to start a typical dev process.

This process is a REPL and supports live-reloading. Before reloading any files ex05b.core/stop is called which terminates the worker and unmounts. After loading the ex05b.core/start is called (also via the initial index.html) which should in theory start the app. Reloading however seems to mess up the WebGL stuff, you probably know better if this is fixable.

Once you are done you run lein run -m shadow.devtools.cli/release demo which creates an :advanced compiled version.

Note that no changes on the code/HTML side are required to switch between dev/release versions.

Currently looking for feedback on how to improve the experience, let me know if you have any thoughts.

postspectacular commented 8 years ago

Thanks a lot, @thheller! This looks really great & will check it out asap...