Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with a new install. #2

Open
PaulSchulz opened this issue Sep 23, 2017 · 2 comments
Open

Issues with a new install. #2

PaulSchulz opened this issue Sep 23, 2017 · 2 comments

Comments

@PaulSchulz
Copy link

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
Copy link
Author

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"

@Quezion
Copy link

Quezion commented Feb 18, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants