Skip to content

Instantly share code, notes, and snippets.

@alandipert
Created May 12, 2016 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alandipert/2a8ea734cf0e8a013e949620791a01d4 to your computer and use it in GitHub Desktop.
Save alandipert/2a8ea734cf0e8a013e949620791a01d4 to your computer and use it in GitHub Desktop.
; sinmara v.1.2.3
(set-env!
:dependencies '[[org.clojure/clojure "1.8.0"]
[com.taoensso/carmine "2.12.2"]
[compojure "1.5.0"]
[adzerk/boot-test "1.0.3" :scope "test"]
[javax.servlet/servlet-api "2.5"]
[pandeiro/boot-http "0.6.2" :scope "test"]
[cheshire "5.4.0"]
[clj-http "2.1.0"]
[clojure-saxon "0.9.4"]
[org.clojure/core.memoize "0.5.6"]
[clojail "1.0.6"]
[hiccup "1.0.5"]
[ring/ring-core "1.4.0"]
[ring/ring-jetty-adapter "1.4.0"]
[adzerk/env "0.3.0"]]
:source-paths #{"test"}
:resource-paths #{"src" "resource"})
(require
'[adzerk.boot-test :refer :all]
'[pandeiro.boot-http :refer :all])
(task-options!
test {:namespaces '#{sinmara.eval-test}}
web {:serve 'sinmara.core/app}
aot {:namespace #{'sinmara.main-class}}
jar {:main 'sinmara.main-class}
sift {:include #{#"\.jar$"}})
(deftask dev
"Start local dev server and REPL."
[f fetch bool "Just fetch Maven deps (used by Docker)."]
(comp (serve :handler 'sinmara.core/app :reload true)
(repl :server true :port 4005)
(if fetch
(repl :client true :eval '(System/exit 0))
(wait))))
(deftask build
"Builds a standalone jar."
[]
(comp (aot)
(uber)
(jar)
(sift)
(target)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment