refactoring old java.lang.Process interop code with babashka.process: https://twitter.com/borkdude/status/1319210076469645312
#!/usr/bin/env bb
(ns dev
(:require [babashka.process :refer [$ destroy-tree *defaults*]]))
(alter-var-root #'*defaults* assoc
:out :inherit
:err :inherit
:shutdown destroy-tree)
(defn cljs []
($ "./clojure" "-A:frontend:cljs/dev"))
(defn less []
($ "./clojure" "-A:frontend:less/dev"))
(defn clojure []
^{:inherit true} ($ "./boot" "dev"))
(cljs)
(less)
(-> @(clojure) :exit (System/exit))
babashka.process
is awesome, just cut one of my functions in half and it's easier to understand 🎉
Thanks :)