This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-31
Channels
- # announcements (3)
- # babashka (75)
- # beginners (16)
- # calva (124)
- # cider (10)
- # clara (2)
- # clj-kondo (1)
- # cljdoc (4)
- # cljs-dev (14)
- # clojure (104)
- # clojure-australia (4)
- # clojure-czech (5)
- # clojure-europe (14)
- # clojure-germany (48)
- # clojure-nl (4)
- # clojure-serbia (4)
- # clojure-uk (34)
- # clojurescript (60)
- # community-development (16)
- # conjure (12)
- # core-async (34)
- # cursive (42)
- # data-science (7)
- # deps-new (9)
- # depstar (1)
- # emacs (11)
- # events (2)
- # fulcro (15)
- # graalvm (1)
- # inf-clojure (1)
- # jobs (3)
- # jobs-discuss (1)
- # joker (7)
- # juxt (8)
- # lsp (20)
- # malli (42)
- # meander (4)
- # off-topic (5)
- # pathom (2)
- # polylith (13)
- # re-frame (39)
- # reagent (9)
- # reitit (31)
- # releases (2)
- # rewrite-clj (23)
- # shadow-cljs (39)
- # spacemacs (11)
- # specter (6)
- # tools-deps (8)
- # xtdb (12)
lein new re-frame my-app
template had a major new release today. It now creates a pure shadow-cljs
build using shadow-cljs.edn
and package.json
as the source of configuration. Appreciate any testing, feedback, issues or PRs from the shadow-cljs community to improve it further.
https://github.com/day8/re-frame-template
nice! one thing you might want to consider is using npm-run-all
and cross-env
like this setup does https://github.com/jacekschae/shadow-cljs-tailwindcss/blob/main/package.json#L2-L10
cross-env
to make things work in windows, since it doesn't support the FOO=thing
env vars otherwise
npm-run-all
contains the run-p
and run-s
utils to run things in parallel or sequentially
also please consider updating the use of the :devtools
:http-root
and :http-port
. they have been deprecated for years and :dev-http
should be used instead https://shadow-cljs.github.io/docs/UsersGuide.html#dev-http
thanks for the link re npm-run-all
/ cross-env
, that will be very helpful.
I'll fix the :devtools
usage now.
:dev-http {8280 {:root "resources/public" :handler foo.bar}}
would be the handler variant
Thanks, but have removed the handler support as we decided to focus purely on the best possible client side experience (being a 're-frame' template) and leave the backend impl to other projects.
I have released v2.0.1 that fixes the deprecated use of devtools
, uses dev-http
.
oh ops; maybe I messed up the template
Thanks for spotting that @thheller. v2.0.2 is releasing on ci now, will be live in 10 minutes. Tested w/ build-defaults
and the version is set correctly.
How do I keep my package.json updated? I updated my cljs dependencies, how do I prune and update the JS packages they were depending on?
My favorite way is yarn upgrade-interactive --exact
How can I get a 'nice' stand-alone terminal REPL going with shadow-cljs? Ideally something like https://github.com/bhauman/rebel-readline
you only get a basic REPL for the terminal. most people use REPL provided by their editor so terminal REPL hasn't had much work
Alright. How would I go about making one?
I'm thinking it shouldn't be that much work to add at least basic readline support/autocompletion to the existing one
you could build one on top of nrepl, maybe using cider-nrepl. then you basically get all the features that has out of the box and you just write the readline code
alright
is the basic shadow-cljs repl talking to an nrepl server, or is it hosting one?
no the basic repl is using a plain streaming socket repl. thats why it has basically no extra features
if you have a shadow-cljs server
or shadow-cljs watch
running you can find the nrepl port via the .shadow-cljs/nrepl.port
file
alright
right yeah
would it be possible to instead hook into the existing shadow-cljs command? so I wouldn't have to keep track of two services
i.e. could I extend it with my own command that runs my REPL and also manages a shadow-cljs server?
if you run the shadow-cljs command separately or from whatever process you launch is your choice
alright