This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-05
Channels
- # beginners (240)
- # boot (5)
- # cider (48)
- # clara (2)
- # cljs-dev (3)
- # cljsrn (66)
- # clojure (111)
- # clojure-denver (2)
- # clojure-italy (42)
- # clojure-nl (5)
- # clojure-spec (12)
- # clojure-uk (45)
- # clojurescript (138)
- # community-development (7)
- # core-async (8)
- # datomic (27)
- # emacs (21)
- # euroclojure (6)
- # figwheel (10)
- # fulcro (29)
- # graphql (5)
- # hoplon (3)
- # luminus (1)
- # lumo (7)
- # mount (4)
- # off-topic (13)
- # onyx (20)
- # parinfer (3)
- # pedestal (4)
- # precept (1)
- # proton (3)
- # re-frame (41)
- # reagent (3)
- # reitit (28)
- # ring-swagger (7)
- # shadow-cljs (88)
- # specter (1)
- # testing (10)
- # tools-deps (27)
- # vim (58)
hey! where I can find :id-of-build which is needed to connect to cljs build? Described like here: https://github.com/thheller/shadow-cljs/wiki/Cider
I've noticed that upon first use, shadow-cljs downloads maven deps and stores them in ~/.m2 - is there a way of configuring this location?
hmm thats a standard maven thing so I'd expect there to be solutions for this with CI
currently using https://github.com/cemerick/pomegranate which is the same lein
is using. might switch to tools.deps
in the future.
@thheller in clojurescript I recall you have to tag functions with ^:export to avoid the names being re-written by advanced compilation, however I see no mention of that with shadow (for the :node-module target). What’s the behaviour?
Also, can I benefit from dead code elimination with :node-module or simialr by specifying a namespace containing my “API”, and get everything that the API doesn’t depend on to be eliminated by Closure?
for :npm-module
everything you don't ^:export
is fair game and will most likely be removed
:node-library
generates ONE file object with exports. so you end up with ONE require("the-thing")
:npm-module
leaves the namespaces intact so you can require individual namespaces require("the-thing/some.ns")
@thheller so that’s similar to using :node-module and writing a special namespace myself, e.g. “api”, which contains my functions?
:node-library generates a single file mapping to various functions in various namespaces?
with :node-library
you specify the :exports
in the config. they can be from different namespaces yes.
but with :node-module, as you said, I need to mark any function that I wish to use post-compilation with ^:export, right?
Do you have a recommended way to integrate shadow with other js projects? e.g. would you generate a npm package and symlink it from your other projects?
specifically to get live-reload to work nicely with create-react-app/parcel/webpack/else
in particular live-reload .. that pretty much goes out the window if you let anything else bundle the code
I did this test a while ago. https://github.com/thheller/react-redux-realworld-example-app/tree/this-is-madness
basically took the entire create-react-app
project. moved some things around but didn't change one line of code.
but thats nowhere near reliable enough now .. but thats the direction I was going with
integration with webpack is easy enough and really depends on how your JS project is setup
or just output it into some directory and refer to the files directly via either relative paths
Basically I am working on a project for which the “core” is written in clojurescript, but I want to develop the interface with React in JS
unfortunately all of this is not totally finished yet since you need to run babel manually currently
While I am at it: you mentioned using the REPL only through your editor. If I wish to use a REPL through the command line, and have the ability to reload namespaces that changed on the fly, how could I do it?
Right now my project is set up with boot. Most of the project is composed of cljc files
I use the Clojure (not clojurescript) REPL, and wrote a function to reload namespaces (that I call manually, (reload)
; it looks for files that changed and reloads the namespaces)
yeah, which goes back to my question on loading a namespace by default when starting the repl
which REPL though? if you let webpack process your sources the REPL and live-reload pretty much don't work
@thheller have been watching your commits. Slow compiles where always my biggest pet peeve with big project cljs builds! DX just got much more pleasant. 💯 thanks for the performance tweaks!
I think there is still lots of tuning that could be done. just need time to do it 🙂