Skip to content

Instantly share code, notes, and snippets.

@borkdude
Last active July 23, 2022 14:25
Show Gist options
  • Save borkdude/2ee8e49803b40cf0fe284c9921388f87 to your computer and use it in GitHub Desktop.
Save borkdude/2ee8e49803b40cf0fe284c9921388f87 to your computer and use it in GitHub Desktop.
Create clojure project with babashka using deps-new
#!/usr/bin/env bb
(require '[babashka.classpath :as cp]
'[babashka.deps :as deps])
(deps/add-deps '{:deps {org.corfield/deps-new {:git/url "https://github.com/borkdude/deps-new"
:git/sha "76259a27c57dba4530671a3d18c610ed904297d7"}
org.babashka/cli {:mvn/version "0.3.31"}
org.babashka/spec.alpha {:git/url "https://github.com/babashka/spec.alpha"
:git/sha "1a841c4cc1d4f6dab7505a98ed2d532dd9d56b78"}}})
;; deps new reads classpath from property:
(System/setProperty "java.class.path" (cp/get-classpath))
(require '[babashka.cli.exec :as exec])
(apply exec/-main "org.corfield.new" *command-line-args*)
;; Usage:
;; new app --name foo/bar --overwrite true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment