babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
borkdude 2020-10-22T09:34:32.054700Z

refactoring old java.lang.Process interop code with babashka.process: https://twitter.com/borkdude/status/1319210076469645312

borkdude 2020-10-22T09:47:25.055Z

#!/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))

1
👏 9
nate 2020-10-22T17:37:27.067500Z

babashka.process is awesome, just cut one of my functions in half and it's easier to understand 🎉

👍 2
2
borkdude 2020-10-22T18:14:57.067700Z

Thanks :)