This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-21
Channels
- # beginners (38)
- # boot (88)
- # cljs-dev (142)
- # cljsrn (2)
- # clojars (1)
- # clojure (107)
- # clojure-berlin (2)
- # clojure-italy (8)
- # clojure-russia (76)
- # clojure-spec (325)
- # clojure-taiwan (3)
- # clojure-uk (28)
- # clojurescript (80)
- # clojurewest (2)
- # core-async (36)
- # core-logic (1)
- # cursive (21)
- # datomic (16)
- # dirac (18)
- # docs (2)
- # emacs (1)
- # euroclojure (3)
- # garden (3)
- # gsoc (2)
- # hoplon (3)
- # immutant (4)
- # jobs-discuss (16)
- # lein-figwheel (5)
- # liberator (17)
- # lumo (19)
- # off-topic (2)
- # om (20)
- # onyx (28)
- # pedestal (50)
- # planck (4)
- # re-frame (5)
- # reagent (3)
- # ring-swagger (13)
- # spacemacs (1)
- # specter (43)
- # testing (3)
- # timbre (3)
- # uncomplicate (1)
- # vim (2)
- # yada (4)
Is it possible with Dirac REPL to configure or hook in via code some forms to eval every time the REPL starts; e.g. I always want certain requires/:refers/:as etc and it would be massive time saver to have it all done automatically @darwin ❓
@superstructor try to look into this: https://github.com/binaryage/dirac/blob/master/src/runtime/dirac/runtime/repl.cljs#L266
you should probably have a test for bootstrapped?
and call this only after REPL is successfully initialized
nice, thanks! Looks like it should be possible with that 🙂 @darwin
assuming this is only for dev build, you can have js/setInterval
in your app watching bootstrapped?
and then call it as soon as you detect that REPL is avail
yep, only for dev builds :thumbsup: awesome!
@superstructor wait a bit, I will look into the nREPL config if this is possible in a better waty
:thumbsup: @darwin
what about tweaking this config option? https://github.com/binaryage/dirac/blob/master/src/nrepl/dirac/nrepl/config.clj#L20 https://github.com/binaryage/dirac/blob/master/src/nrepl/dirac/nrepl/config_helpers.clj#L8-L12
this code gets called exactly as cljs REPL init step (bootstrapping) - but that means different bootstrapping than that function in runtime api
sounds sensible, so just write my own extension of standard-repl-init-code
right ?
follow this FAQ entry: https://github.com/binaryage/dirac/blob/master/docs/faq.md#how-do-i-reveal-source-files-via-nrepl
as shown there (preferred) or you can simply define an environmental variable if it is more convenient a you just want one global config for all your builds
that env variable would be something like env DIRAC_NREPL__REPL_INIT_CODE=“(something …)” boot build-my-project
I guess
thats awesome, thanks again @darwin 🙂 your a legend!