                 :source-paths ["admin/cljs" "env/admin-prod/cljs"]
                 :compiler {:main          potato.admin
                            :output-to     "resources/public/js/admin.js"
+                           :output-dir    "resources/public/js/admin-prod/out/"
                            :optimizations :advanced
                            :elide-asserts true
                            :pretty-print  false}}]}
 
   :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]
                  :welcome (println "Welcome to Potato dev server Clojure REPL.")
-                 :init-ns potato.dev}                 
+                 :init-ns potato.dev}
   :figwheel {:server-port      10555
              :http-server-root "public"
              :nrepl-port       7888})

  :description        "A Potato front-end implemented with OM"
  :url                "http://potato.network"
  :license            {:name "Apache"}
  :min-lein-version   "2.5.3"

  :dependencies [[org.clojure/clojure       "1.8.0"]
                 [http-kit "2.1.19"]
                 [org.clojure/clojurescript "1.8.51" :scope "provided"]
                 [org.omcljs/om             "0.9.0"]
                 [org.clojure/core.async    "0.2.374"]
                 ;; If cljs-http is upgraded to 0.1.39, the code will fail when compiled with optimisations enabled
                 [cljs-http                 "0.1.30" :exclusions [org.clojure/core.async]]
                 [cljsjs/moment             "2.9.0-0"]]

  :plugins      [[lein-cljsbuild            "1.1.3"] ; Leiningen plugin to make ClojureScript development easy
                 ]

  :clean-targets ^{:protect false} ["resources/public/js"]

  :profiles {:dev {:dependencies [[com.cemerick/piggieback "0.2.1"]
                                  [figwheel-sidecar "0.5.3-2"]]
                   :source-paths ["cljs_src"]
                   :plugins [[lein-figwheel "0.5.3-2" :exclusions [org.clojure/clojure
                                                                   org.clojure/tools.reader
                                                                   ring/ring-core
                                                                   commons-fileupload
                                                                   clj-time]]
                             [cider/cider-nrepl "0.16.0-SNAPSHOT" :exclusions [org.clojure/clojure
                                                                               org.clojure/tools.nrepl]]]}}

  :cljsbuild {:builds
              [{:id "dev"

                :source-paths ["src/cljs" "env/prod/cljs"]
                :compiler {:main          potato.main
                           :output-to     "resources/public/js/potato.js"
                           :output-dir    "resources/public/js/prod/out"
                           :optimizations :advanced
                           :externs       ["externs-input.js"]
                           :elide-asserts false
