This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-22
Channels
- # announcements (5)
- # aws (38)
- # aws-lambda (21)
- # babashka (45)
- # beginners (87)
- # boot (1)
- # calva (32)
- # cider (23)
- # clara (7)
- # clj-kondo (41)
- # cljs-dev (29)
- # clojure (145)
- # clojure-europe (6)
- # clojure-italy (12)
- # clojure-nl (4)
- # clojure-spec (39)
- # clojure-uk (45)
- # clojurescript (171)
- # copenhagen-clojurians (4)
- # cursive (14)
- # datomic (48)
- # docker (6)
- # figwheel-main (2)
- # fulcro (54)
- # jackdaw (1)
- # jobs (1)
- # kaocha (3)
- # leiningen (7)
- # luminus (6)
- # malli (2)
- # off-topic (51)
- # pathom (8)
- # quil (20)
- # re-frame (14)
- # reagent (1)
- # reitit (2)
- # remote-jobs (1)
- # shadow-cljs (39)
- # tools-deps (1)
- # vim (12)
- # xtdb (5)
Hi. Is there a typo on line 382 in shadow/cljs/npm/cli.cljs? Looks like the map isn't applied to clojure-args as I expect is the intention? @thheller
I've switched to use borkdude's deps.exe on Windows (aliased to also be named clojure), and getting an error where my aliases ends up treated as a file somehow
I guess I'm missing how the transducer is applied to the clojure-args the way it is written
It takes the same args as the powershell thing. But seems the args get passed mangled for some reason
I don't know anything about deps.exe
and don't have time to look into that right now
It is a clojure implemented replacement for the bash (and powershell) scripts. Compiled via graalvm.
(that I've added proxy support to and hence have an easier time getting to work in an enterprise Crap network setup)
running a random .exe is easier in an enterprise setup? seems like that would be the first thing to be prohibited 😛
Is there a way I can create a .js
file in my project and have the build process send that file to the output-dir
so another tool can pull it in with js/require
?
It looks like https://clojurescript.org/reference/dependencies#bundling-javascript-code would be an alternative. If I could do the following, then I wouldn't have to js/require
, I could just (:require [my-lib])
?
(cljs.build.api/build "src"
{:output-to "out/main.js"
:externs ["yayquery-externs.js"]
:foreign-libs [{:file "yayquery.js"
:provides ["yq"]}]
:optimizations :advanced})
But shadow doesn't work like that? https://shadow-cljs.github.io/docs/UsersGuide.html#publish-deps-cljswhat exactly are you trying to do though? I mean why must shadow-cljs be involved in copying a file?
:foreign-libs
is not supported by shadow-cljs and also doesn't do what you asked for
Not that it must be. I'm just copying it over by hand now every time I re-generate it and it's been annoying enough that I'm looking for an alternative. Could be a separate watcher that I run somewhere. But that lead me to being curious if there was something possible with what I'm already using.
also what kind of file is it? why must it be loaded via require
and not CLJS directly?
This brings up another question I've been having but is probably more related to the react native workflow than shadow-cljs. Should I ever need to rm the output dir? Like, the docs on publishing for Android say to do a gradlew clean
before a gradlew buildRelease
. And the react-native cli has a react-native run-android --reset-cache
. Is it ever necessary to rm -r ouput-dir/
?
That's kind of the reason I don't generate it straight to the output dir. I clean that directory occasionally and copy the file back over rather than re-generate it into the output dir.