karad / lein_template_descjop

A Leiningen template(Clojure/ClojureScript Project) for Web based desktop application with Electron (atom-shell).
http://descjop.org
394 stars 16 forks source link

Add Reagent Project #9

Closed mopemope closed 8 years ago

mopemope commented 8 years ago

Add Reagent project (with figwheel)

mopemope commented 8 years ago

@karad Thanks. Fixed.

karad commented 8 years ago

I try to run your reagent project. but I saw message "Reagent does not work." on Electron window. I think you have to fix template in resources for +reagent mode.

in resources/leiningen/new/descjop/reagent__project.clj

               :frontend {:id "{{name}}-reagent"
                          :source-paths ["src_front"]
                          :incremental true
                          :jar true
                          :assert true
                          :compiler {:output-to "app/js/front.js"
                                     :externs ["app/js/externs.js"]
                                     :warnings true
                                     :elide-asserts true

                                     ;; no optimize compile (dev)
                                     :optimizations :none            // <- uncomment
                                     ;; when no optimize uncomment
                                     :output-dir "app/js/out"        // <- uncomment

                                     ;; simple compile (dev)
                                     ;;:optimizations :simple

                                     ;; advanced compile (prod)
                                     ;;:optimizations :advanced      // <- comment and change advanced

                                     ;;:source-map "app/js/test.js.map"
                                     :pretty-print true
                                     :output-wrapper true
                                     }}}}
mopemope commented 8 years ago

reagent project need 2 tasks . try it.

$ lein trampoline cljsbuild auto main

and run another terminal

$ lein trampoline figwheel frontend

figwheel support only frontend

karad commented 8 years ago

Oh thanks! I'll try it.