Hey darwin, I was checking my own issue here
and I was wondering if there is a way to detect if the runtime is already installed for both dirac
and cljs-devtools
Hi Richard, well, there are some “runtime” functions which will give you the answer, but I’m afraid it won’t be that easy, because boot task cannot really talk to javascript in your page, but I don’t know boot
this is the function in case of Dirac :repl feature: https://github.com/binaryage/dirac/blob/master/src/runtime/dirac/runtime/repl.cljs#L166
ahah, Andrea for friends 😄
ah, ok, sorry :
ok I'll try I think I might be able to call it at that point
np 😄
in case of custom formatters you could check this variable: https://github.com/binaryage/cljs-devtools/blob/master/src/devtools/custom_formatters.cljs#L6 but I could expose it into ‘official’ api, I think
that would be great, at the moment boot-cljs-devtools
can call any function from dirac and devtools because the ns are on the classpath
so it requires and calls ['devtools.core/install! 'dirac.runtime/install!]
automagically
btw. both dirac runtime and cljs-devtools can potentially have multiple “features” independently enabled/disabled
yes I have noticed that -> https://github.com/jupl/boot-cljs-devtools/issues/6
are you really calling javascript or you are just generating some code which will be emitted into javascript files produced by boot?
no it works this way: there is a artifact.cljs.edn
that is called by boot for compiling the js
that file contains :require
and :init-fns
keys
which are symbols called beforehand
ok, I will add, public api for detecting if given feature key is currently installed
in boot-cljs-devtools there are going to be default set of features
+ configurable from the command line
:repl
:custom-formatters
are default
I’m also going to add :all
features key, so you will be able install all, without specifying them as list
oh awesome
also :default, which will behave like now when you don’t specify any parameter to install
perfect that saves me some work 😄
with sanity-hints it is tricky, I didn’t want to enable it by default, because it does monkey patching and that could cause some compatibility issues for some people
so it is explicit opt-in
I always personally opt-in
but I did not know that 😄