jobim icon indicating copy to clipboard operation
jobim copied to clipboard

Issues with a new install.

Open PaulSchulz opened this issue 8 years ago • 2 comments

I have just created a jobim project and am having the following issues.

Method: lein new jobim-presentation my-talk cd my-talk lein figwheel dev

Open browser (chromium) to file://path/to/my-talk

  1. Warning from generated test file - undeclared Var my-talk.show-test/testing at line 7 test/my_talk/show_test.cljs.

  2. Error in Browser console. This is generated by the ' default-style' line in the generated 'core.cljs'. Uncaught Error: No protocol method IDeref.-deref defined for type cljs.core/PersistentHashMap: {:align-items "center", :color "#EDEDED", :font-size "2em", :font-weight "100", :background-color "#222222", :width "100%", :justify-content "center", :display "flex", :font-family "Droid Sans Mono, monospace", :height "100%"}

From project.clj

(defproject my-talk "0.1.0-SNAPSHOT" :description "FIXME" :url "FIXME" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"}

:dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.7.170"] [org.clojure/core.async "0.2.374"] [reagent "0.6.0-alpha"] [fipp "0.6.4"] [org.clojars.mysterysal/jobim "2.0.0"] [org.clojars.mysterysal/jobim-figwheel "0.1.0"]]

:plugins [[lein-cljsbuild "1.1.1"] [lein-figwheel "0.5.0"]]

:source-paths ["src"]

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

:cljsbuild {:builds [{:id "dev" :source-paths ["src" "test"] :figwheel true :compiler {:output-to "resources/public/js/compiled/show.js" :output-dir "resources/public/js/compiled/out" :asset-path "js/compiled/out" :main my-talk.show-test :source-map true :cache-analysis true}} {:id "min" :source-paths ["src"] :compiler {:output-to "resources/public/js/compiled/show.min.js" :main my-talk.show :optimizations :whitespace :pretty-print false}}]}

:figwheel {:css-dirs ["resources/public/css"]})

PaulSchulz avatar Sep 23 '17 12:09 PaulSchulz

Workaround for issue 1 is to comment out the test code in tests/my_talk/show_test.cljs

Workaround found for Issue 2.

The following patch of the lein generated 'show.cljs' file allows the page to be displayed diff --git a/src/my_talk/show.cljs b/src/my_talk/show.cljs index 0fc1ae9..8d8cfc3 100644 --- a/src/my_talk/show.cljs +++ b/src/my_talk/show.cljs @@ -3,7 +3,10 @@ :refer [default-style title] :refer-macros [defshow]]))

+(defonce show-state (jobim/new-show)) + (defshow my-show

  • show-state default-style (title "my-talk"

PaulSchulz avatar Sep 24 '17 03:09 PaulSchulz

@PaulSchulz I just used this to get the local template working 4 years later. Thanks!

Quezion avatar Feb 18 '21 23:02 Quezion