Skip to content

Instantly share code, notes, and snippets.

@ashnur
Created October 22, 2017 18:30
Show Gist options
  • Save ashnur/4ad6184a08bd0fd0535c838719a84a5b to your computer and use it in GitHub Desktop.
Save ashnur/4ad6184a08bd0fd0535c838719a84a5b to your computer and use it in GitHub Desktop.
(defproject cards "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.671" :scope "provided"]
[com.cognitect/transit-clj "0.8.300"]
[ring "1.6.2"]
[ring/ring-defaults "0.3.1"]
[bk/ring-gzip "0.2.1"]
[radicalzephyr/ring.middleware.logger "0.6.0"]
[compojure "1.6.0"]
[environ "1.1.0"]
[com.stuartsierra/component "0.3.2"]
[org.danielsz/system "0.4.0"]
[org.clojure/tools.namespace "0.2.11"]
[http-kit "2.2.0"]]
:plugins [[lein-cljsbuild "1.1.6"]
[lein-environ "1.1.0"]
[lein-sassc "0.10.4"]
[lein-auto "0.1.3"]]
:min-lein-version "2.6.1"
:source-paths ["src/clj" "src/cljs" "src/cljc"]
:test-paths ["test/clj" "test/cljc"]
:clean-targets ^{:protect false} [:target-path :compile-path "resources/public/js"]
:uberjar-name "cards.jar"
;; Use `lein run` if you just want to start a HTTP server, without figwheel
:main cards.application
;; nREPL by default starts in the :main namespace, we want to start in `user`
;; because that's where our development helper functions like (go) and
;; (browser-repl) live.
:repl-options {:init-ns user}
:cljsbuild {:builds
[{:id "app"
:source-paths ["src/cljs" "src/cljc" "dev"]
:figwheel {:on-jsload "cards.system/reset"}
:compiler {:main cljs.user
:asset-path "js/compiled/out"
:output-to "resources/public/js/compiled/cards.js"
:output-dir "resources/public/js/compiled/out"
:source-map-timestamp true}}
{:id "test"
:source-paths ["src/cljs" "test/cljs" "src/cljc" "test/cljc"]
:compiler {:output-to "resources/public/js/compiled/testable.js"
:main cards.test-runner
:optimizations :none}}
{:id "min"
:source-paths ["src/cljs" "src/cljc"]
:jar true
:compiler {:main cards.system
:output-to "resources/public/js/compiled/cards.js"
:output-dir "target"
:source-map-timestamp true
:optimizations :advanced
:pretty-print false}}]}
;; When running figwheel from nREPL, figwheel will read this configuration
;; stanza, but it will read it without passing through leiningen's profile
;; merging. So don't put a :figwheel section under the :dev profile, it will
;; not be picked up, instead configure figwheel here on the top level.
:figwheel {;; :http-server-root "public" ;; serve static assets from resources/public/
;; :server-port 3449 ;; default
;; :server-ip "127.0.0.1" ;; default
:css-dirs ["resources/public/css"] ;; watch and update CSS
;; Start an nREPL server into the running figwheel process. We
;; don't do this, instead we do the opposite, running figwheel from
;; an nREPL process, see
;; https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl
;; :nrepl-port 7888
;; To be able to open files in your editor from the heads up display
;; you will need to put a script on your path.
;; that script will have to take a file path and a line number
;; ie. in ~/bin/myfile-opener
;; #! /bin/sh
;; emacsclient -n +$2 $1
;;
;; :open-file-command "myfile-opener"
:server-logfile "log/figwheel.log"}
:doo {:build "test"}
:sassc [{:src "src/scss/style.scss"
:output-to "resources/public/css/style.css"}]
:auto {"sassc" {:file-pattern #"\.(scss)$"
:paths ["src/scss"]}}
:profiles {:dev
{:dependencies [[figwheel "0.5.11"]
[figwheel-sidecar "0.5.11"]
[com.cemerick/piggieback "0.2.2"]
[lein-doo "0.1.7"]
[reloaded.repl "0.2.3"]]
:plugins [[lein-figwheel "0.5.11"]
[lein-doo "0.1.7"]]
:source-paths ["dev"]}
:uberjar
{:source-paths ^:replace ["src/clj" "src/cljc"]
:prep-tasks ["compile"
["cljsbuild" "once" "min"]]
:hooks [leiningen.sassc]
:omit-source true
:aot :all}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment