project.clj 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. (defproject automata "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.6.1"
  7. :dependencies [[org.clojure/clojure "1.8.0"]
  8. [org.clojure/clojurescript "1.9.89"]
  9. [org.clojure/core.async "0.2.385"
  10. :exclusions [org.clojure/tools.reader]]
  11. [reagent "0.5.1"]]
  12. :plugins [[lein-figwheel "0.5.4-7"]
  13. [lein-cljsbuild "1.1.3" :exclusions [[org.clojure/clojure]]]]
  14. :source-paths ["src"]
  15. :clean-targets ^{:protect false} ["resources/public/js/compiled" "target"]
  16. :cljsbuild {:builds
  17. [{:id "dev"
  18. :source-paths ["src"]
  19. ;; the presence of a :figwheel configuration here
  20. ;; will cause figwheel to inject the figwheel client
  21. ;; into your build
  22. :figwheel {:on-jsload "automata.core/on-js-reload"
  23. ;; :open-urls will pop open your application
  24. ;; in the default browser once Figwheel has
  25. ;; started and complied your application.
  26. ;; Comment this out once it no longer serves you.
  27. ;:open-urls ["http://localhost:3449/index.html"]
  28. }
  29. :compiler {:main automata.core
  30. :asset-path "js/compiled/out"
  31. :output-to "resources/public/js/compiled/automata.js"
  32. :output-dir "resources/public/js/compiled/out"
  33. :source-map-timestamp true
  34. ;; To console.log CLJS data-structures make sure you enable devtools in Chrome
  35. ;; https://github.com/binaryage/cljs-devtools
  36. :preloads [devtools.preload]}}
  37. ;; This next build is an compressed minified build for
  38. ;; production. You can build this with:
  39. ;; lein cljsbuild once min
  40. {:id "min"
  41. :source-paths ["src"]
  42. :compiler {:output-to "resources/public/js/compiled/automata.js"
  43. :main automata.core
  44. :optimizations :advanced
  45. :pretty-print false}}]}
  46. :figwheel {;; :http-server-root "public" ;; default and assumes "resources"
  47. ;; :server-port 3449 ;; default
  48. ;; :server-ip "127.0.0.1"
  49. :css-dirs ["resources/public/css"] ;; watch and update CSS
  50. ;; Start an nREPL server into the running figwheel process
  51. ;; :nrepl-port 7888
  52. ;; Server Ring Handler (optional)
  53. ;; if you want to embed a ring handler into the figwheel http-kit
  54. ;; server, this is for simple ring servers, if this
  55. ;; doesn't work for you just run your own server :) (see lein-ring)
  56. ;; :ring-handler hello_world.server/handler
  57. ;; To be able to open files in your editor from the heads up display
  58. ;; you will need to put a script on your path.
  59. ;; that script will have to take a file path and a line number
  60. ;; ie. in ~/bin/myfile-opener
  61. ;; #! /bin/sh
  62. ;; emacsclient -n +$2 $1
  63. ;;
  64. ;; :open-file-command "myfile-opener"
  65. ;; if you are using emacsclient you can just use
  66. ;; :open-file-command "emacsclient"
  67. ;; if you want to disable the REPL
  68. ;; :repl false
  69. ;; to configure a different figwheel logfile path
  70. ;; :server-logfile "tmp/logs/figwheel-logfile.log"
  71. }
  72. ;; setting up nREPL for Figwheel and ClojureScript dev
  73. ;; Please see:
  74. ;; https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl
  75. :profiles {:dev {:dependencies [[binaryage/devtools "0.7.2"]
  76. [figwheel-sidecar "0.5.4-7"]
  77. [com.cemerick/piggieback "0.2.1"]]
  78. ;; need to add dev source path here to get user.clj loaded
  79. :source-paths ["src" "dev"]
  80. ;; for CIDER
  81. ;; :plugins [[cider/cider-nrepl "0.12.0"]]
  82. :repl-options {; for nREPL dev you really need to limit output
  83. :init (set! *print-length* 50)
  84. :nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}}
  85. )