Skip to content

Commit

Permalink
feat: update reagent and devcards
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesilva committed Jun 7, 2020
1 parent 1a4f7f7 commit 531c8e7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
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"
}
}
8 changes: 6 additions & 2 deletions template/shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
:modules {:main {:init-fn app.cards/main}}
:compiler-options {:devcards true}
:output-dir "public/js"
;; Workaround for https://github.com/bhauman/devcards/issues/168
:js-options {:resolve {"devcards-marked" {:target :npm :require "marked"}
"devcards-syntax-highlighter" {:target :npm :require "highlight.js"}
}}
:target :browser}
: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

0 comments on commit 531c8e7

Please sign in to comment.