Fork me on GitHub

I went to a meetup last night about 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


but it probably will have the same issues and don't fit that into the system


Thanks, I might give it a try, but so far only done very small cljs things, so don't really need it.


It's very similar Gatsby, but is more configurable


yeah going over the docs the integration would look pretty similar


might even work better since they don't seem to do these AST transforms that gatsby does


I have been considering writing one of those site generators for shadow-cljs


@gklijs got curious and implemented the same example I did for gatsby.


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


could be worked around though

Hannu Hartikainen11:09:47

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?

Hannu Hartikainen11:09:10

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

👍 4