This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-22
Channels
- # alda (1)
- # aws-lambda (23)
- # beginners (27)
- # boot (156)
- # business (2)
- # carry (4)
- # cider (1)
- # cljsjs (2)
- # cljsrn (29)
- # clojure (170)
- # clojure-austin (35)
- # clojure-czech (8)
- # clojure-dusseldorf (5)
- # clojure-italy (4)
- # clojure-nl (1)
- # clojure-quebec (2)
- # clojure-russia (45)
- # clojure-spec (49)
- # clojure-uk (12)
- # clojurescript (81)
- # component (5)
- # datomic (24)
- # devcards (26)
- # emacs (4)
- # hoplon (4)
- # jobs (1)
- # juxt (5)
- # leiningen (6)
- # luminus (14)
- # mount (26)
- # om (27)
- # om-next (2)
- # onyx (22)
- # pedestal (2)
- # planck (3)
- # proton (5)
- # re-frame (19)
- # reagent (2)
- # ring-swagger (60)
- # spacemacs (12)
- # specter (8)
- # untangled (119)
- # vim (61)
- # yada (36)
do people use devcards with github pages? is it typical to just commit the compiled JS, or is there a better way?
(I'm not saying that's not a proper question to this channel, but rather that devcards to gh pages shouldn't be any more complicated than any other cljs/js thingy to gh pages)
honestly didn't know if there was another way. have never used gh pages before
@eyelidlessness: looks like I’m treading the same path you just have - trying to get a devcards ui on github pages. I’m currently stuck on the advanced build not including any of my code (but it has react twice, I think?). I made sure I had :devcards true
in the right place, as that’s what fixed yours, but still no dice. would you mind posting your cljsbuild config?
here’s mine, for reference:
:github-pages {:source-paths ["src" "dev"]
:compiler {:output-to "docs/gh-pages.js"
:main snowth.devcards
:devcards true
:optimizations :advanced}}
is :github-pages
the id?
one of mine (i'm testing against both reagent 0.5.1 and 0.6.0 so i have a nearly identical 0.6.0 compilation):
{:id "0.5.1"
:source-paths ["docs" "src" "test"]
:compiler {:devcards true
:optimizations :advanced
:output-dir "docs/0.5.1/out"
:output-to "docs/0.5.1/build.js"
:source-map "docs/0.5.1/build.js.map"}
:notify-command ["phantomjs"
"test/phantomjs_runner.js"
"docs/0.5.1/build.js"]}
you may want to use the [{:id "github-pages" ... }]
structure, as i am pretty sure that's preferred
not sure if it'll affect your build but it can, i've seen cljsbuild do some wonky things with the map structure
pretty sure vector of id'd map is preferred, though there are some outdated wiki pages which are not so clear 🙂
any js errors?
there’s an error that I think occurs because of react being included twice, during compilation:
SEVERE: file:/Users/brent/.m2/repository/cljsjs/react-dom/0.14.3-0/react-dom-0.14.3-0.jar!/cljsjs/react-dom/common/react-dom.ext.js:85: ERROR - constant ReactDOMServer assigned a value more than once.
Original definition at file:/Users/brent/.m2/repository/cljsjs/react-dom-server/0.14.3-0/react-dom-server-0.14.3-0.jar!/cljsjs/react-dom-server/common/react-dom-server.ext.js:13
var ReactDOMServer = {};
worth noting, this is my devcards dependency:
[devcards "0.2.1-7"
:exclusions [org.clojure/clojure
org.clojure/clojurescript
cljsjs/react
cljsjs/react-dom
cljsjs/react-server]]
i specify clojure/clojurescript directly, and use the react deps provided by each version of reagent i test
:thumbsup: