- Modify
deps.edn
to contain the dependencies you need. - Call
bb zip <zipname>
to create the ZIP-file, omitting the extension.zip
.
Created
June 20, 2022 18:14
-
-
Save MrGung/4d08f6e9334dc3c970d92186f91400f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:tasks {:requires ([clojure.string :as str] | |
[babashka.fs :as fs]) | |
:init (do | |
(def zipname (first *command-line-args*))) | |
zip {:depends [temp-file] | |
:task (shell (format "tar -cf %s.zip -T %s" zipname temp-file))} | |
temp-file {:depends [strip-src] | |
:task (let [fil (.toFile (fs/create-temp-file))] | |
(spit fil (str/join "\n" strip-src)) | |
fil)} | |
strip-src {:depends [split-src] | |
:task (remove (fn [path] (= path "src")) split-src)} | |
split-src {:depends [deps] | |
:task (str/split deps (re-pattern ";"))} | |
deps {:depends [] | |
:task (with-out-str (clojure "-Spath -Sdeps"))}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:deps {thheller/shadow-cljs {:mvn/version "2.19.3"}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment