This repository has been archived by the owner on Nov 23, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theex05b.core/start
is called (also via the initialindex.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.