dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
superstructor 2017-03-21T20:49:43.972231Z

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

2017-03-21T20:51:32.017796Z

you should probably have a test for bootstrapped? and call this only after REPL is successfully initialized

superstructor 2017-03-21T20:51:44.022928Z

nice, thanks! Looks like it should be possible with that 🙂 @darwin

2017-03-21T20:52:29.041423Z

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

superstructor 2017-03-21T20:52:55.051990Z

yep, only for dev builds :thumbsup: awesome!

2017-03-21T20:53:56.077520Z

wait bootstrapped> is not the thing I thought

2017-03-21T20:55:01.104553Z

@superstructor wait a bit, I will look into the nREPL config if this is possible in a better waty

superstructor 2017-03-21T20:55:57.128152Z

:thumbsup: @darwin

2017-03-21T20:56:37.145398Z

this code gets called exactly as cljs REPL init step (bootstrapping) - but that means different bootstrapping than that function in runtime api

superstructor 2017-03-21T20:57:11.159540Z

sounds sensible, so just write my own extension of standard-repl-init-code right ?

2017-03-21T20:57:57.179140Z

and replace :reveal-url-script-path with :repl-init-code

2017-03-21T20:58:18.187534Z

nrepl-config can be configured per cljs build

2017-03-21T20:58:57.204266Z

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

2017-03-21T21:00:04.232676Z

that env variable would be something like env DIRAC_NREPL__REPL_INIT_CODE=“(something …)” boot build-my-project I guess

superstructor 2017-03-21T21:09:05.448631Z

thats awesome, thanks again @darwin 🙂 your a legend!

👍 1