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

feat: update reagent and devcards #145

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@
},
"devDependencies": {
"@testing-library/dom": "^7.7.3",
"@testing-library/react": "^10.0.4",
"@testing-library/react": "^10.0.4",
"clj-kondo": "2020.01.13",
"highlight.js": "10.0.3",
"jsdom": "^16.2.2",
"jsdom-global": "^3.0.2",
"marked": "^1.1.0",
"marked": "^1.1.0",
"rimraf": "~3.0.2",
"serve-handler": "~6.1.2",
"shadow-cljs": "~2.9.10",
"shadow-cljs": "~2.10.4",
"taiko": "~1.0.11",
"taiko-diagnostics": "~0.4.0",
"zprint-clj": "~0.8.0"
},
"dependencies": {
"create-react-class": "~15.6.3",
"react": "~16.8.0",
"react-dom": "~16.8.0"
"create-react-class": "15.6.3",
"react": "~16.13.1",
"react-dom": "~16.13.1"
}
}
9 changes: 6 additions & 3 deletions template/shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
:modules {:main {:init-fn app.cards/main}}
:compiler-options {:devcards true}
:output-dir "public/js"
:target :browser}
:target :browser
;; Workaround for https://github.com/bhauman/devcards/issues/168
:build-options {:ns-aliases {devcards-marked cljsjs.marked
devcards-syntax-highlighter cljsjs.highlight}}}
:test {:ns-regexp "app.cards"
:output-to "out/test.js"
:target :node-test}
:e2e {:ns-regexp "e2e.*"
:output-to "out/e2e.js"
:target :node-test}}
:dependencies [[reagent "0.8.1"]
[devcards "0.2.6"]]
:dependencies [[reagent "0.10.0"]
[devcards "0.2.7"]]
:dev-http {3000 "public"}
:nrepl {:port 3333}
:source-paths ["src"]}
4 changes: 2 additions & 2 deletions template/src/app/core.cljs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(ns app.core
"This namespace contains your application and is the entrypoint for 'yarn start'."
(:require [reagent.core :as r]
(:require [reagent.dom :as rd]
[app.hello :refer [hello]]))

(defn ^:dev/after-load render
"Render the toplevel component for this app."
[]
(r/render [hello] (.getElementById js/document "app")))
(rd/render [hello] (.getElementById js/document "app")))

(defn ^:export main
"Run application startup logic."
Expand Down
5 changes: 5 additions & 0 deletions template/src/cljsjs/highlight.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(ns cljsjs.highlight
(:require ["highlight.js" :as highlight]))

(js/goog.exportSymbol "highlight" highlight)
(js/goog.exportSymbol "DevcardsSyntaxHighlighter" highlight)
5 changes: 5 additions & 0 deletions template/src/cljsjs/marked.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(ns cljsjs.marked
(:require ["marked" :as marked]))

(js/goog.exportSymbol "marked" marked)
(js/goog.exportSymbol "DevcardsMarked" marked)