This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-23
Channels
- # adventofcode (16)
- # babashka (41)
- # beginners (31)
- # biff (1)
- # calva (9)
- # clj-otel (2)
- # clojure (124)
- # clojure-austin (1)
- # clojure-belgium (1)
- # clojure-europe (11)
- # clojure-nl (3)
- # clojure-norway (8)
- # clojure-uk (5)
- # clojuredesign-podcast (10)
- # cryogen (1)
- # cursive (4)
- # data-science (1)
- # datomic (12)
- # emacs (37)
- # events (2)
- # fulcro (13)
- # guix (1)
- # honeysql (1)
- # hyperfiddle (8)
- # jobs (1)
- # missionary (21)
- # overtone (3)
- # pathom (6)
- # polylith (1)
- # portal (1)
- # practicalli (1)
- # releases (1)
- # remote-jobs (13)
- # ring (2)
- # sci (14)
- # shadow-cljs (23)
- # squint (4)
how can i set different deps (using deps.edn) for different buids?
For example, build :app
use all the deps
in deps.edn
but I want another dependency for the build :tool
that is not supported and also not necessary, just enable all aliases you need always. deps.edn does not control what the build ends up using, so extra dependencies hurt no one
https://code.thheller.com/blog/shadow-cljs/2018/02/08/problem-solved-source-paths.html
ok I see. Now I understand that what I actually need is to build a node binary (executable).
I'm a bit confused between node-library
and npm-module
I want to build a project, publish it to npm, and then in another project install it and execute as a binary (I guess it has to be via yarn or npm and not deps.edn, since I don't want to build it again)
I recommend creating a dedicated packages/the-thing
folder with its own package.json
you can add a "bin"
entry in package.json
so others can run npx the-thing foo bar
to execute
thats more or less how you get the shadow-cljs
command, see https://github.com/thheller/shadow-cljs/tree/master/packages/shadow-cljs
What should be in the npm package when I publish?
At first I thought only out
and bin
, but then I received the error
/home/app/dev/deps/apps/drift-v2/node_modules/@deps/deps-ops/.shadow-cljs/builds/main/dev/out/cljs-runtime/goog.debug.error.js
I guess I need to add the folder .shadow-cljs
as well for the cljs runtime, right?thats why I suggested to use the packages/the-thing
folder. Only what is in that you need