Fork me on GitHub
#announcements
<
2021-05-15
>
raspasov08:05:48

Since this question comes up pretty often, I made cljs-101:

👏 10
2
yuhan09:05:30

That's really convenient! Is the user intended to clone the repo supposed or simply copy the clj shell invocation? If it's the former, why not include an alias in a deps.edn and simply call clj -M:node

raspasov10:05:55

You can have the deps.edn also 🙂 I just wanted “the least number of files”. I wanted to demystify the starting of a REPL. If you put it behind an alias, you then need to teach people what an alias is in the context of deps.edn 🙂 Which can be useful but is not critical to get going.

raspasov10:05:06

Not really clone, there’s literally nothing to clone! 🙂 It’s just one line command.

yuhan10:05:30

Yup, that's what I gathered, but the Readme and example code made it seem like it should be invoked from the project folder

yuhan10:05:55

I also didn't realise the CLI tool implicitly adds "src/" to the classpath from wherever it was invoked, even when there's no deps.edn file - just small things that may be confusing to beginners

borkdude11:05:21

I've been doing it like clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.597"}}}' -M -m cljs.main -re node since a few years

👍 2
henryw37418:05:10

I suppose this says something about the sorry state of http://clojurescript.org

👍 3
seancorfield21:05:39

@UCPS050BV The CLI itself can tell you that:

seanc@DESKTOP-30ICA76:~/clojure$ ls
data  example
seanc@DESKTOP-30ICA76:~/clojure$ clojure -Sdescribe
{:version "1.10.3.839"
 :config-files ["/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.10.3.839/deps.edn" "/home/seanc/.clojure/deps.edn" ]
 :config-user "/home/seanc/.clojure/deps.edn"
 :config-project "deps.edn"
 :install-dir "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.10.3.839"
 :config-dir "/home/seanc/.clojure"
 :cache-dir "/home/seanc/.clojure/.cpcache"
 :force false
 :repro false
 :main-aliases ""
 :repl-aliases ""}
seanc@DESKTOP-30ICA76:~/clojure$ clojure -Spath
src:/home/seanc/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar:/home/seanc/.m2/repository/org/clojure/core.specs.alpha/0.2.56/core.specs.alpha-0.2.56.jar:/home/seanc/.m2/repository/org/clojure/spec.alpha/0.2.194/spec.alpha-0.2.194.jar
seanc@DESKTOP-30ICA76:~/clojure$
No deps.edn file there, but src is on the path.

littleli13:05:53

I reported the first... not a bug, rather a report.

raspasov13:05:57

Ha! 🙂 Thanks. Sorry, I haven’t seen a Windows for years. So it works… after you run it twice?

littleli14:05:51

No 🙂 there is a problem with escaping. Check the backslash \ before double quote "

littleli14:05:36

Escaping work differently under Windows unfortunately. So the command has to look a bit different which I wanted to demonstrate in the issue description.

raspasov15:05:46

Aha! Got it. Merged 👍

littleli15:05:53

Sure thing. Great small project!

👍 2