adzerk-oss / boot-cljs-repl

Boot task providing a REPL for ClojureScript development.
Eclipse Public License 1.0
72 stars 28 forks source link

Add dir and repl-opts to the cljs-task #40

Open hoeck opened 8 years ago

hoeck commented 8 years ago

I extended the cljs-repl task to allow setting the :output-dir for code compiled on the CLJS REPL (e.g. when require-ing a namespace) and other CLJS REPL options. This fixes #36 and #32, the former really annoying me as I couldn't simply (require 'cljs.pprint) on the repl.

Unfortunately, I was not able to find an automated way of getting the current target dir and compilation file (I'm using the new target task in my setup), so I settled on an option to the to set the REPLs :output-dir manually. It defaults to "target/main.out", which will work with the setup that I copied from the boot-cljs-example-repo.

Deraen commented 8 years ago

This simple approach won't work because we can't trust that target dir exists. Users might not even have any target dir etc.

Proper solution is to somehow (fileset metadata) publish the temp-dir used by boot-cljs so we can use that here.

nikki93 commented 7 years ago

@Deraen Any updates on this since? Will try this workaround but wondering if this was fixed or there is another workaround.