Given a script like below, how would one expose the promesa.core alias p to make it accessible within the repl?
(ns demo.core
(:require
[nbb.repl :as repl]
[promesa.core :as p]))
(defn -main []
(p/do! (repl/repl) (println “Repl closed”)))Published as 1.2.171. The PR with the version bump didn't trigger the publish since it also needs a tag. Next time it would be better if I did that myself and not as part of a PR but thanks for the attempt :)
My mistake! Didn’t mean to overstep there.
no problem
I guess we could support an :init expression
- :init, function of no arguments, initialization hook called with
bindings for set!-able vars in place.
default: #()similar to clojure.main/repl
but then something that returns a promise, probably, to enable require stuff
That would be great. Updating and upgrading the replit nbb template, thought it would be nice if one could immediately write (p/-> (js/fetch “
issue and/or PR welcome
Will create the issue right now. Got a few questions about the impl then can give it a shot later in the afternoon