plexus / chestnut

Application template for Clojure + ClojureScript web apps
Eclipse Public License 1.0
1.32k stars 99 forks source link

Make cljc code reloadable. #206

Closed featheredtoast closed 7 years ago

featheredtoast commented 7 years ago

Add dev-target js compiling folder to disallow cljs name conflicts during a reload. dev-target feels like the best name to mirror 'target', but I am open to discussion here.

Re-enable wrap-reload in the dev environment, allowing routes to reload automatically on change, without a system restart.

This is in an effort to address some of the issues brought up on the mailing list.

featheredtoast commented 7 years ago

Changing where the app builds would also partially resolve #177 - the app build would be moved, and the min build would stay put.

plexus commented 7 years ago

This way you lose the ability to inject dependencies into the routes, which is the whole reason we're using the system endpoint/routes components.

featheredtoast commented 7 years ago

What if we were to leave out the wrap-reload + routes config, as a separate issue, and focus only on the path restructure for right now? I bundled it as it all was relevant to "fix the reload experience" but we can itemize it further.

The main part from this is the classpath changes, because cljs compiling of cljc files to a location within the classpath breaks reloading.

featheredtoast commented 7 years ago

Alright, cut out wrap-reload for another time.

The main focus of this is now to only add a directory named dev-target to compile into, and serve the compiled cljs out of that is outside the classpath when running from the repl.

plexus commented 7 years ago

Thanks a lot Jeff!