project.clj 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. :compiler {:main automata.core
  29. :asset-path "js/compiled/out"
  30. :output-to "resources/public/js/compiled/automata.js"
  31. :output-dir "resources/public/js/compiled/out"
  32. :source-map-timestamp true
  33. ;; To console.log CLJS data-structures make sure you enable devtools in Chrome
  34. ;; https://github.com/binaryage/cljs-devtools
  35. :preloads [devtools.preload]}}
  36. ;; This next build is an compressed minified build for
  37. ;; production. You can build this with:
  38. ;; lein cljsbuild once min
  39. {:id "min"
  40. :source-paths ["src"]
  41. :compiler {:output-to "resources/public/js/compiled/automata.js"
  42. :main automata.core
  43. :optimizations :advanced
  44. :pretty-print false}}]}
  45. :figwheel {;; :http-server-root "public" ;; default and assumes "resources"
  46. ;; :server-port 3449 ;; default
  47. ;; :server-ip "127.0.0.1"
  48. :css-dirs ["resources/public/css"] ;; watch and update CSS
  49. ;; Start an nREPL server into the running figwheel process
  50. ;; :nrepl-port 7888
  51. ;; Server Ring Handler (optional)
  52. ;; if you want to embed a ring handler into the figwheel http-kit
  53. ;; server, this is for simple ring servers, if this
  54. ;; doesn't work for you just run your own server :) (see lein-ring)
  55. ;; :ring-handler hello_world.server/handler
  56. ;; To be able to open files in your editor from the heads up display
  57. ;; you will need to put a script on your path.
  58. ;; that script will have to take a file path and a line number
  59. ;; ie. in ~/bin/myfile-opener
  60. ;; #! /bin/sh
  61. ;; emacsclient -n +$2 $1
  62. ;;
  63. ;; :open-file-command "myfile-opener"
  64. ;; if you are using emacsclient you can just use
  65. ;; :open-file-command "emacsclient"
  66. ;; if you want to disable the REPL
  67. ;; :repl false
  68. ;; to configure a different figwheel logfile path
  69. ;; :server-logfile "tmp/logs/figwheel-logfile.log"
  70. }
  71. ;; setting up nREPL for Figwheel and ClojureScript dev
  72. ;; Please see:
  73. ;; https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl
  74. :profiles {:dev {:dependencies [[binaryage/devtools "0.7.2"]
  75. [figwheel-sidecar "0.5.4-7"]
  76. [com.cemerick/piggieback "0.2.1"]]
  77. ;; need to add dev source path here to get user.clj loaded
  78. :source-paths ["src" "dev"]
  79. ;; for CIDER
  80. ;; :plugins [[cider/cider-nrepl "0.12.0"]]
  81. :repl-options {; for nREPL dev you really need to limit output
  82. :init (set! *print-length* 50)
  83. :nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}}
  84. )