lambdaisland / kaocha-cljs

ClojureScript support for Kaocha
Eclipse Public License 1.0
40 stars 10 forks source link

Fix npm-deps not quite working #53

Closed humorless closed 1 year ago

humorless commented 1 year ago

For the bug/issues pointed out here. #25

It all works fine if a change is made to kaocha-cljs to (dissoc copts :main) prior to starting the REPL.

Just implemented it.

(dissoc copts :main)

You can verify the results by using this repo. Remember that when you link kaocha-cljs to the new version, you should also change the kaocha to the newer version, otherwise it will not run.

alysbrooks commented 1 year ago

Looks good! Do you know why (dissoc copts :main) fixes this issue?

plexus commented 1 year ago

We use the compiler options twice (if :cljs/precompile? is true), once to do the precompilation, once to start a REPL to communicate with. For the first the :main needs to be there (in this case), but for the second it should not be there.

@humorless this looks good! Can you add a section to the README on how to use kaocha-cljs with :npm-deps?

humorless commented 1 year ago

To @alysbrooks , I did not know why it works until @plexus explained it. I have updated the README.