Last active
December 3, 2015 00:34
-
-
Save bartojs/b247f426e4425e912ee1 to your computer and use it in GitHub Desktop.
boot-clj task to generate project.clj for cursive clojure
This file contains hidden or 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
;; add to build.boot to generate project.clj for cursiveclojure | |
;; adds clojurescript if boot-cljs is used | |
(deftask lein [] | |
(let [coords [(symbol (or (get-env :project) "boot-project")) (or (get-env :version) "0.1.0-SNAPSHOT")] | |
proj (into {} (keep #(if-let [x (get-env %)] [% x]) | |
[:url :licence :description :dependencies])) | |
cljs? (.matches (pr-str (:dependencies proj)) ".*adzerk/boot-cljs .*") | |
projcljs (update-in proj [:dependencies] conj '[org.clojure/clojurescript "1.7.170"])] | |
(spit "project.clj" (cons 'defproject (apply concat coords (if cljs? projcljs proj)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment