This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-01
Channels
- # beginners (59)
- # cider (3)
- # clara (4)
- # cljsjs (4)
- # clojure (144)
- # clojure-finland (2)
- # clojure-italy (10)
- # clojure-russia (2)
- # clojure-spec (7)
- # clojure-uk (53)
- # clojurescript (81)
- # cursive (30)
- # datomic (36)
- # defnpodcast (2)
- # editors (3)
- # emacs (4)
- # events (1)
- # fulcro (12)
- # off-topic (11)
- # onyx (14)
- # parinfer (2)
- # pedestal (12)
- # re-frame (3)
- # reagent (26)
- # shadow-cljs (81)
- # spacemacs (10)
- # sql (59)
- # uncomplicate (4)
- # yada (4)
is there a way I can add a package to my classpath when using shadow and deps? I need to include cider/nrepl v0.18 without hardcoding it in deps.edn
https://clojure.org/reference/deps_and_cli#_directories also says that it will check $HOME/.clojure/deps.edn
I was wondering what kind of support cider had for deps.edn already, I know it automatically injects the nrepl middleware and all that for leiningen
I noticed a weird thing: when I launched and connected to my app via cider, and then manually started shadow-cljs, it wouldn’t allow me to connect to a cljs repl
but when I set up my dev profile to automatically start shadow-cljs, suddenly it was dropping me in shadow.user
on startup and I could connect to CLJS REPLs 😄
I’m not unhappy about it, it was just surprising - I didn’t know what was going on. still don’t. but I’m guessing it’s some sort of CIDER + shadow-cljs magic
previously, I was starting shadow-cljs by running cider-jack-in, then require
ing the shadow server et. al., starting it and running a build
a bit of FUD, but I think it's all working when adding the cider version to my global .clojure/deps.edn. I upgraded emacs and a bunch of stuff yesterday, and all of a sudden my .cljs files weren't connected to my cljs repl instance. when evaling I'd get something like cannot call stringp of nil
, where nil was the cider cljs connection
so pinning the cider version in the project to the one in emacs seems to have fixed it
for whatever reason I couldn’t switch into a CLJS REPL, I can’t remember why. but after setting up lein to automatically start the shadow server and my build, it started working ¯\(ツ)/¯
unless you open a second connection but AFAICT cider only expects to run over one connection
I’m not reporting a bug or anything, it was just weird. I can try and reproduce it again if you are curious
should this work?
;; deps.edn
:aliases
{:dev {:extra-deps {thheller/shadow-cljs {:mvn/version "2.4.24"}
binaryage/devtools {:mvn/version "0.9.10"}}
:extra-paths ["dev"]}}
clj -A:dev -m shadow.cljs.devtoools.cli release client
i’m getting this error:
clj -A:dev -m shadow.cljs.devtoools.cli release client
2018-08-01 12:57:06.920:INFO::main: Logging initialized @11265ms
Exception in thread "main" java.io.FileNotFoundException: Could not locate shadow/cljs/devtoools/cli__
init.class or shadow/cljs/devtoools/cli.clj on classpath.
if I run clj -A:dev
and then (require '[shadow.cljs.devtools.cli])
, it requires it just fine
I'm thinking about dropping the devtools
package for the .api
, .cli
and .server
namespace
nice. I’ll probably setup a :release
alias now. just needed to sanity check my understanding of clj
actually this is dumb. this is going to to load my whole app classpath in order to execute shadow-cljs
:thinking_face: if I set :deps true
in my shadow-cljs.edn, and give it an alias, will it also load all of the top-level :deps
in deps.edn?
I assume so, which means if I want to use shadow-cljs using deps.edn I need to separate my clojure app deps from my client app deps and put them in separate aliases
Does anyone know how I could use something like https://css-blocks.com/ with a reagent project running on shadow-cljs?
@lilactown what exactly is your goal? if you are going to separate deps anyways why not keep CLJS deps in shadow-cljs.edn
?
@dfcarpenter I use this myself https://github.com/thheller/shadow/wiki/shadow.markup but all the CSS-in-JS(ish) tools will be rather hard to integrate and are currently not supported
@thheller Yeah, I was taking a closer look at it and it seems unfeasable. I might just resort to the standard separate SCSS tooling
yeah I do have plans for something scss related so that should become easier hopefully
I posted on reddit about this a little while ago: https://www.reddit.com/r/Clojure/comments/8vn6lr/new_clojurians_ask_anything/e1u5qgn/?context=1
Here's a gist of the code 😛 https://gist.github.com/Lokeh/5ecb2f77c4a488bc37cf347fe6edfe56