This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-19
Channels
- # bangalore-clj (2)
- # beginners (217)
- # boot (3)
- # cider (130)
- # cljs-dev (117)
- # cljsrn (11)
- # clojure (99)
- # clojure-china (1)
- # clojure-denver (1)
- # clojure-dev (22)
- # clojure-italy (30)
- # clojure-norway (5)
- # clojure-russia (13)
- # clojure-sanfrancisco (3)
- # clojure-spec (74)
- # clojure-uk (107)
- # clojurescript (40)
- # clr (6)
- # core-async (25)
- # core-logic (4)
- # cursive (1)
- # data-science (1)
- # datomic (62)
- # duct (11)
- # editors (14)
- # figwheel (3)
- # fulcro (12)
- # funcool (1)
- # garden (12)
- # graphql (19)
- # jobs (4)
- # jobs-rus (1)
- # lein-figwheel (1)
- # leiningen (12)
- # luminus (5)
- # off-topic (45)
- # onyx (12)
- # other-languages (1)
- # parinfer (5)
- # programming-beginners (3)
- # re-frame (113)
- # reagent (63)
- # remote-jobs (10)
- # ring-swagger (1)
- # shadow-cljs (31)
- # slack-help (3)
- # spacemacs (27)
- # specter (1)
- # unrepl (44)
- # yada (16)
If anyone upgraded cider I made .dir-locals.el file with this code:
((nil . ((projectile-project-type . lein-test)
(eval . (progn
(require 'cider)
(add-to-list 'cider-cljs-repl-types '("Shadow CLJS" "(do (shadow.cljs.devtools.server/start!) (shadow.cljs.devtools.api/watch :app) (shadow.cljs.devtools.api/nrepl-select :app))" nil))
(setq projectile-create-missing-test-files t))))))
This will make it possible to start up your cljs-repl again from emacs@mitchelkuijpers it still requires lein
right?
Yes for this solution you need leiningen
Or you could connect to nrepl which shadow-cljs starts but then you have to add their middleware first
We want to move to a deps.edn setup at one point so that would be nice. Not sure how that works though. I am talking in the #cider room about this
Btw we don't need leiningen but we need to inject the nrepl middleware
hi, has anyone tried packaging shadow-cljs compiled JS (production) code into jars, for consumption in another cljs projects?
@fbielejec for CLJS you should only be packaging the cljs source files never compiled code
I see - and what about publishing as a module to npm registry, and then requiring via node_modules?
either :node-library
or :node-script
work for that. see https://shadow-cljs.github.io/docs/UsersGuide.html#target-node-library
shadow-cljs started out as :node-script
but :npm-module
is slight more flexible but also more complex
Gotcha - I'm looking into ways of utilizing shadow-cljs compiled modules in upstream projects still using :cljsbuild
. I suppose one could force fetching of that dependency via :npm-deps
or lein-npm plugin, :notify
or some other mechanism?
I cannot emphasize this enough. DO NOT USE compiled CLJS code in OTHER cljs projects
problem is that the compiled version of the library will contain its own version of cljs.core
there is no viable option if the other project is using cljsbuild and doesn't understand npm-deps properly
for CLJS the problem is that the cljs compiler needs access to the sources. there really isn't anything that can be done about this.