This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-01
Channels
- # announcements (1)
- # aws (3)
- # beginners (150)
- # boot (12)
- # calva (7)
- # carry (3)
- # cider (1)
- # clara (51)
- # cljdoc (17)
- # cljs-dev (17)
- # cljsrn (1)
- # clojure (64)
- # clojure-austin (2)
- # clojure-india (1)
- # clojure-italy (10)
- # clojure-nl (4)
- # clojure-spec (42)
- # clojure-uk (63)
- # clojurescript (24)
- # core-async (23)
- # cursive (6)
- # datascript (7)
- # datomic (5)
- # figwheel-main (43)
- # fulcro (74)
- # hoplon (7)
- # kaocha (30)
- # leiningen (32)
- # mount (51)
- # nrepl (34)
- # off-topic (29)
- # re-frame (6)
- # reagent (10)
- # reitit (13)
- # shadow-cljs (66)
- # slack-help (3)
- # spacemacs (2)
- # specter (5)
- # sql (2)
- # tools-deps (51)
- # yada (13)
I’ve configured shadow to run with lein
I’m trying to release the code but I’m getting the error above.
make sure its [com.google.javascript/closure-compiler-unshaded "v20180910"]
or later
since everyone else seems to be pasting their exceptions, I might as well participate too 🙂
sometimes during compilation we get this:
yeah, I guess it has something to do with that hawk
library.
is that watcher activated dynamically based on the platform or should it be always there? I'm asking because I'm running linux 🙂
okay, thanks for the info 👍 I think I'll report this to the hawk project, let them sort it out. in any case, the error doesn't seem to cause any issues, most likely it just fails to watch one or more files
wow, thanks 🙂
@lasse.maatta try 2.6.23
. error might still happen but now I should be able to fix it if it does.
thanks @thheller, I didn’t know I had to add the closure compiler myself
anyone know if I can have a specific name for my release file?
right now I’m using a hook to the :flush stage to execute a “cp <outputfile> <releasefile>”
no, sorry
yes the :output-to it is only for node
yeah, module name…so using a diff kw as the module name will cause a diff name for the file
I got it, I just need two builds sections, one for my dev with the paths for dev
and a new one for my release
and code splitting is going to rely on those names, so…I think perhaps you’re asking for future trouble
I have not tried it, but you could perhaps set different output directories with https://shadow-cljs.github.io/docs/UsersGuide.html#_release_specific_vs_development_configuration
it’s because we are used to use a name during development and then when the js file is complete we compilete it in the right production folder
I also test that and it “works”, but it is the same name for dev and prod
it is not really a problem
It’s just an old habit
but I’m going to use it, it’s really simple that way
Hi there, Can someone refer me to an example of a shadow-cljs project with both cljs and clj files in order for me to understand how data can be required from one to the other? I basically want some to use some Clojure libraries in the back and serve the data in the cljs front.
@adamgefen not sure I understand the question. shadow-cljs generally focuses only on CLJS development and I recommend using lein
for CLJ. as far as sharing sources is concerned you just point both at the same :source-paths
and use the code as normal
@thheller so if I use some Java scraping library to grab xml to a clojure data structure, I should write it as edn to :source path
and slurp it back in my cljs file?
no you probably want to create a HTTP server in CLJ for that and let the CLJS app talk to that
Ok. I'll look into that.
I want it for the browser but I did think that it will be useful to keep some logic in the back in order to be able to expand.
@adamgefen If you want the browser to convert xml into edn, you could go with an npm package such as https://www.npmjs.com/package/xml2js and then transform it to edn with js->clj
.
thanks @grav, I'll have a look.
@thheller yeah, that was pretty old. Came in from here (what I started with to build the example): https://github.com/shadow-cljs/examples/blob/master/electron/package.json