This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-27
Channels
- # beginners (54)
- # bitcoin (2)
- # boot (1)
- # calva (10)
- # cider (30)
- # cljs-dev (25)
- # cljsrn (17)
- # clojure (27)
- # clojure-dev (16)
- # clojure-estonia (3)
- # clojure-hk (1)
- # clojure-italy (8)
- # clojure-losangeles (1)
- # clojure-nl (17)
- # clojure-russia (1)
- # clojure-spec (15)
- # clojure-uk (45)
- # clojurebridge (1)
- # clojurescript (95)
- # clojurescript-ios (1)
- # core-async (5)
- # cursive (10)
- # datomic (8)
- # emacs (2)
- # figwheel-main (31)
- # fulcro (99)
- # hyperfiddle (3)
- # immutant (1)
- # jobs (13)
- # jobs-discuss (82)
- # keechma (6)
- # leiningen (3)
- # lumo (1)
- # nrepl (1)
- # off-topic (37)
- # onyx (1)
- # pedestal (6)
- # re-frame (7)
- # reitit (2)
- # remote-jobs (1)
- # ring-swagger (3)
- # rum (6)
- # shadow-cljs (14)
- # specter (4)
- # tools-deps (27)
- # yada (12)
I went to a meetup last night about https://github.com/zeit/next.js/ is it possibly combinable with shadow-cljs? One of the problems of a big spa, especially with clojurescript is that you need all the js for all the pages.
@gklijs it is probably easy to use in the same way I tried with gatsby https://clojureverse.org/t/creating-websites-with-gatsby-shadow-cljs/2912
Thanks, I might give it a try, but so far only done very small cljs things, so don't really need it.
might even work better since they don't seem to do these AST transforms that gatsby does
@gklijs got curious and implemented the same example I did for gatsby. https://github.com/thheller/next-cljs
works fine but has some issues around SSR since it serializes the data to JSON and that doesn't work too well for CLJS data
I tried running tests using node.js with an npm script
"scripts": {
"test": "shadow-cljs compile test"
}
and the shadow-cljs build config
:test {:target :node-test
:output-to "target/node-tests.js"
:ns-regexp "-test$"
:autorun true}}}
But when I run the tests (whether by npm test
or npm run test
) the exit status is zero even if there were failures. Is it just a bad idea to run the tests with :autorun
?The docs say > The node process exit code will be set to 0 when successful and 1 on any failures. and > :autorun (boolean, optional) Run the tests via node when a build completes so I expected this should work. Maybe the docs just need a clarification.
@hannu.hartikainen don't use :autorun
if you need the exit code. it mostly meant for running tests automatically with watch
. use shadow-cljs compile test && node target/node-tests.js
instead