Fork me on GitHub
#dirac
<
2016-05-29
>
richiardiandrea17:05:27

Hey darwin, I was checking my own issue here

richiardiandrea17:05:05

and I was wondering if there is a way to detect if the runtime is already installed for both dirac and cljs-devtools

darwin17:05:15

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

richiardiandrea17:05:56

ahah, Andrea for friends 😄

darwin18:05:21

ah, ok, sorry :

richiardiandrea18:05:28

ok I'll try I think I might be able to call it at that point

darwin18:05:41

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

richiardiandrea18:05:37

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

richiardiandrea18:05:51

so it requires and calls ['devtools.core/install! 'dirac.runtime/install!]

darwin18:05:28

btw. both dirac runtime and cljs-devtools can potentially have multiple “features” independently enabled/disabled

darwin18:05:10

are you really calling javascript or you are just generating some code which will be emitted into javascript files produced by boot?

richiardiandrea18:05:46

no it works this way: there is a artifact.cljs.edn that is called by boot for compiling the js

richiardiandrea18:05:06

that file contains :require and :init-fns keys

richiardiandrea18:05:26

which are symbols called beforehand

darwin18:05:03

ok, I will add, public api for detecting if given feature key is currently installed

richiardiandrea18:05:53

in boot-cljs-devtools there are going to be default set of features

richiardiandrea18:05:02

+ configurable from the command line

richiardiandrea18:05:17

:repl :custom-formatters are default

darwin18:05:46

I’m also going to add :all features key, so you will be able install all, without specifying them as list

darwin18:05:02

also :default, which will behave like now when you don’t specify any parameter to install

richiardiandrea18:05:17

perfect that saves me some work 😄

darwin18:05:57

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

darwin18:05:05

so it is explicit opt-in

richiardiandrea18:05:16

I always personally opt-in

richiardiandrea18:05:23

but I did not know that 😄