2
0

project.clj 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. (defproject uspooge-app "0.1.0-SNAPSHOT"
  2. :description "FIXME: write this!"
  3. :url "http://example.com/FIXME"
  4. :license {:name "Eclipse Public License"
  5. :url "http://www.eclipse.org/legal/epl-v10.html"}
  6. :min-lein-version "2.7.1"
  7. :jvm-opts ["-Xmx512M"]
  8. :dependencies [[org.clojure/clojure "1.9.0"]
  9. [org.clojure/clojurescript "1.9.946"]
  10. [org.clojure/core.async "0.4.474"]
  11. [reagent "0.7.0"]
  12. [cljsjs/react-router-dom "4.2.2-0" :exclusions [cljsjs/react]]
  13. [cljs-http "0.1.44"]
  14. ]
  15. :plugins [[lein-figwheel "0.5.15"]
  16. [lein-cljsbuild "1.1.7" :exclusions [[org.clojure/clojure]]]]
  17. :source-paths ["src"]
  18. :cljsbuild {:builds
  19. [{:id "dev"
  20. :source-paths ["src"]
  21. ;; The presence of a :figwheel configuration here
  22. ;; will cause figwheel to inject the figwheel client
  23. ;; into your build
  24. :figwheel {:on-jsload "uspooge-app.core/on-js-reload"
  25. ;; :open-urls will pop open your application
  26. ;; in the default browser once Figwheel has
  27. ;; started and compiled your application.
  28. ;; Comment this out once it no longer serves you.
  29. :websocket-host :js-client-host
  30. :open-urls ["http://localhost:3449/index.html"]}
  31. :compiler {:main uspooge-app.core
  32. :asset-path "js/compiled/out"
  33. :output-to "resources/public/js/compiled/uspooge_app.js"
  34. :output-dir "resources/public/js/compiled/out"
  35. :source-map-timestamp true
  36. ;; To console.log CLJS data-structures make sure you enable devtools in Chrome
  37. ;; https://github.com/binaryage/cljs-devtools
  38. :preloads [devtools.preload]}}
  39. ;; This next build is a compressed minified build for
  40. ;; production. You can build this with:
  41. ;; lein cljsbuild once min
  42. {:id "min"
  43. :source-paths ["src"]
  44. :compiler {:output-to "resources/public/js/compiled/uspooge_app.js"
  45. :main uspooge-app.core
  46. :optimizations :advanced
  47. :pretty-print false}}]}
  48. :figwheel {;; :http-server-root "public" ;; default and assumes "resources"
  49. ;; :server-port 3449 ;; default
  50. ;; :server-ip "127.0.0.1"
  51. :hawk-options {} ; slow but lets us work in docker/ssfhs
  52. :css-dirs ["resources/public/css"] ;; watch and update CSS
  53. ;; Start an nREPL server into the running figwheel process
  54. ;; :nrepl-port 7888
  55. ;; Server Ring Handler (optional)
  56. ;; if you want to embed a ring handler into the figwheel http-kit
  57. ;; server, this is for simple ring servers, if this
  58. ;; doesn't work for you just run your own server :) (see lein-ring)
  59. ;; :ring-handler hello_world.server/handler
  60. ;; To be able to open files in your editor from the heads up display
  61. ;; you will need to put a script on your path.
  62. ;; that script will have to take a file path and a line number
  63. ;; ie. in ~/bin/myfile-opener
  64. ;; #! /bin/sh
  65. ;; emacsclient -n +$2 $1
  66. ;;
  67. ;; :open-file-command "myfile-opener"
  68. ;; if you are using emacsclient you can just use
  69. ;; :open-file-command "emacsclient"
  70. ;; if you want to disable the REPL
  71. ;; :repl false
  72. ;; to configure a different figwheel logfile path
  73. ;; :server-logfile "tmp/logs/figwheel-logfile.log"
  74. ;; to pipe all the output to the repl
  75. ;; :server-logfile false
  76. }
  77. ;; Setting up nREPL for Figwheel and ClojureScript dev
  78. ;; Please see:
  79. ;; https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl
  80. :profiles {:dev {:dependencies [[binaryage/devtools "0.9.9"]
  81. [figwheel-sidecar "0.5.15"]
  82. [com.cemerick/piggieback "0.2.2"]]
  83. ;; need to add dev source path here to get user.clj loaded
  84. :source-paths ["src" "dev"]
  85. ;; for CIDER
  86. ;; :plugins [[cider/cider-nrepl "0.12.0"]]
  87. :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
  88. ;; need to add the compliled assets to the :clean-targets
  89. :clean-targets ^{:protect false} ["resources/public/js/compiled"
  90. :target-path]}})