Closed cldwalker closed 9 years ago
Once #52 lands we'll have modern clojurescript eval and I'd like to make this a part of that release. @rundis @tonsky @kenny-evitt @stephenbrady Any thoughts on or objections to this?
@cldwalker No objections – only happy thoughts!
Not sure why I’m in that list, but obviously I don’t mind :)
Thanks for the feedback all. I've made both the default cljs client and the relative paths/urls to look for configurable via behaviors. I'll be releasing later today
:+1:
This is an attempt to make a clojurescript eval that just works for your project, much like clojure's eval and inspired by realizations in #8. Try it out:
EDIT: Not working with new clojurescript versions until #52 lands:lein new mies-om om-test
cd om-test && lein cljsbuild once
(enable-console-print!)
The client auto-magically works by looking for a number of common places for index.html and opening it. We can make this a configurable behavior as well as disabling this feature entirely for power users. We could also make opening to an external browser a configurable behavior.
As for implementation, I resorted to a new connection as we may want to open an internal or external browser. We could reuse the existing internal browser connection and same for the external one. However, that will require changing their :connects to kick off behaviorw and this feature will block until the next release. As for placement of the :connect call, I tried placing it in
:exec.cljs
behavior to less success. Current placement seems reasonable. If we don't like the tag check, we could change :create to point to a trigger e.g.:create-eval-connection
@LightTable/committers Would love to get feedback. I'm also going to open this up to the community on a mailing list thread.