mount/build.boot

143 lines
5.7 KiB
Text
Raw Normal View History

2019-01-28 15:34:26 +00:00
(def +version+ "0.1.17-SNAPSHOT")
2015-12-22 01:52:31 +00:00
(set-env!
:source-paths #{"src"}
2015-12-21 19:41:06 +00:00
:dependencies '[;; mount brings _no dependencies_, everything here is for
;; mount dev, examples apps and tests
2016-05-31 13:47:31 +00:00
[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.7.228" :scope "provided" :classifier "aot"]
[datascript "0.15.0" :scope "provided"]
[compojure "1.5.0" :scope "provided"]
[ring/ring-jetty-adapter "1.1.0" :scope "provided"]
[cheshire "5.5.0" :scope "provided"]
2015-12-21 19:41:06 +00:00
[hiccups "0.3.0" :scope "provided" :exclusions [org.clojure/clojurescript]]
[com.andrewmcveigh/cljs-time "0.3.14" :scope "provided"]
[ch.qos.logback/logback-classic "1.1.3" :scope "provided"]
[org.clojure/tools.logging "0.3.1" :scope "provided"]
[robert/hooke "1.3.0" :scope "provided"]
[org.clojure/tools.namespace "0.2.11" :scope "provided"]
2015-12-21 19:41:06 +00:00
[org.clojure/tools.nrepl "0.2.12" :scope "provided"]
2016-05-31 13:47:31 +00:00
[com.datomic/datomic-free "0.9.5359" :scope "provided" :exclusions [joda-time]]
2016-12-02 22:33:40 +00:00
;; proto repl for fun and joy
[proto-repl "0.3.1" :scope "provided"]
[proto-repl-charts "0.3.2" :scope "provided"]
2015-12-21 19:41:06 +00:00
;; boot clj
[boot/core "2.7.1" :scope "provided"]
2015-12-21 00:16:48 +00:00
[adzerk/bootlaces "0.1.13" :scope "test"]
[adzerk/boot-logservice "1.2.0" :scope "test"]
2016-05-31 13:47:31 +00:00
[adzerk/boot-test "1.1.1" :scope "test"]
2016-06-09 18:23:50 +00:00
[tolitius/boot-check "0.1.2" :scope "test"]
2015-12-21 19:41:06 +00:00
;; boot cljs
2016-05-31 13:47:31 +00:00
[adzerk/boot-cljs "1.7.228-1" :scope "test"]
2015-12-21 19:41:06 +00:00
[adzerk/boot-cljs-repl "0.3.0" :scope "test"]
[pandeiro/boot-http "0.7.1-SNAPSHOT" :scope "test"]
2015-12-24 22:25:01 +00:00
[tolitius/boot-stripper "0.1.0-SNAPSHOT" :scope "test"]
2015-12-21 19:41:06 +00:00
[com.cemerick/piggieback "0.2.1" :scope "test" :exclusions [org.clojure/clojurescript]]
[weasel "0.7.0" :scope "test" :exclusions [org.clojure/clojurescript]]
2016-05-31 13:24:14 +00:00
[adzerk/boot-reload "0.4.8" :scope "test"]
2016-06-09 18:23:50 +00:00
[crisptrutski/boot-cljs-test "0.2.1-SNAPSHOT" :scope "test"]])
(require '[adzerk.bootlaces :refer :all]
2015-12-21 00:16:48 +00:00
'[adzerk.boot-test :as bt]
'[adzerk.boot-logservice :as log-service]
2015-12-21 19:41:06 +00:00
'[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]]
'[adzerk.boot-reload :refer [reload]]
2015-12-31 01:37:43 +00:00
'[tolitius.boot-check :as check]
2015-12-24 22:25:01 +00:00
'[tolitius.boot-stripper :refer [strip-deps-attr]]
2015-12-31 01:37:43 +00:00
'[pandeiro.boot-http :refer :all]
2015-12-21 21:49:13 +00:00
'[crisptrutski.boot-cljs-test :as tcs]
2015-12-21 19:41:06 +00:00
'[clojure.tools.logging :as log]
2015-12-21 00:16:48 +00:00
'[clojure.tools.namespace.repl :refer [set-refresh-dirs]])
(bootlaces! +version+)
2015-12-21 19:41:06 +00:00
(def log4b
2015-12-21 00:16:48 +00:00
[:configuration
[:appender {:name "STDOUT" :class "ch.qos.logback.core.ConsoleAppender"}
[:encoder [:pattern "%-5level %logger{36} - %msg%n"]]]
[:root {:level "TRACE"}
[:appender-ref {:ref "STDOUT"}]]])
2015-12-21 19:41:06 +00:00
(deftask dev []
(set-env! :source-paths #(conj % "dev/clj" "dev/cljs"))
2016-12-02 22:33:40 +00:00
(alter-var-root #'log/*logger-factory*
2015-12-21 19:41:06 +00:00
(constantly (log-service/make-factory log4b)))
2015-12-21 00:16:48 +00:00
(apply set-refresh-dirs (get-env :directories))
(load-data-readers!)
2015-12-21 00:16:48 +00:00
(require 'dev)
(in-ns 'dev))
(deftask test []
(set-env! :source-paths #(conj % "test/core" "test/clj")) ;; (!) :source-paths must not overlap.
(bt/test))
2015-12-21 21:49:13 +00:00
(deftask test-cljs []
(set-env! :source-paths #(conj % "test/core" "test/cljs"))
(set-env! :resource-paths #{"test/resources"})
(require '[mount.core])
2016-12-02 22:33:40 +00:00
(comp
2015-12-24 22:25:01 +00:00
(strip-deps-attr :attr :classifier :value "aot")
2015-12-22 01:04:05 +00:00
(tcs/test-cljs ;; :optimizations :advanced
:out-file "mount.js")))
2015-12-21 21:49:13 +00:00
(deftask test-cljs-advanced []
(set-env! :source-paths #(conj % "dev/clj" "dev/cljs"))
(set-env! :resource-paths #{"dev/resources"})
2016-12-02 22:33:40 +00:00
2015-12-22 01:04:05 +00:00
(comp
(cljs :optimizations :advanced :ids #{"mount"})))
2015-12-21 21:49:13 +00:00
2015-12-31 01:37:43 +00:00
(deftask check-sources []
(set-env! :source-paths #(conj % "dev/clj" "dev/cljs" "test/core" "test/clj" "test/cljs"))
2016-01-02 19:29:19 +00:00
;; (load-data-readers!)
2015-12-31 01:37:43 +00:00
(comp
(check/with-bikeshed)
2016-01-02 19:29:19 +00:00
(check/with-eastwood)
;; (check/with-yagni) ;; yagni does not yet support (throws on) "cljc"
2015-12-31 01:37:43 +00:00
(check/with-kibit)))
(deftask cljs-dev
"mount cljs dev example"
[]
(set-env! :source-paths #(conj % "dev/clj" "dev/cljs"))
(set-env! :resource-paths #{"dev/resources"})
(comp
(serve :dir "dev/resources/public/")
(watch)
(reload)
(cljs-repl)
(cljs :optimizations :none :ids #{"mount"})))
2016-12-02 22:33:40 +00:00
(deftask cljs-example
2015-12-21 19:41:06 +00:00
"mount cljs example"
[]
(set-env! :source-paths #(conj % "dev/clj" "dev/cljs"))
(set-env! :resource-paths #{"dev/resources"})
(comp
(wait)
(serve :dir "dev/resources/public/")
(cljs-repl)
(cljs :optimizations :advanced :ids #{"mount"})))
(task-options!
2016-06-09 18:23:50 +00:00
tcs/test-cljs {:js-env :phantom}
push {:ensure-branch nil}
pom {:project 'mount
:version +version+
:description "managing Clojure and ClojureScript app state since (reset)"
:url "https://github.com/tolitius/mount"
:scm {:url "https://github.com/tolitius/mount"}
:license {"Eclipse Public License"
"http://www.eclipse.org/legal/epl-v10.html"}})