This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-16
Channels
- # aleph (2)
- # beginners (68)
- # boot (25)
- # bristol-clojurians (5)
- # cider (10)
- # cljs-dev (60)
- # cljsrn (1)
- # clojure (138)
- # clojure-austin (1)
- # clojure-france (2)
- # clojure-greece (11)
- # clojure-italy (4)
- # clojure-russia (16)
- # clojure-spec (4)
- # clojure-uk (75)
- # clojurescript (26)
- # core-async (28)
- # cursive (25)
- # data-science (4)
- # datomic (16)
- # defnpodcast (2)
- # devops (2)
- # docs (10)
- # duct (11)
- # emacs (1)
- # events (1)
- # figwheel (8)
- # fulcro (61)
- # garden (2)
- # hoplon (6)
- # java (6)
- # jobs-discuss (1)
- # lein-figwheel (14)
- # leiningen (86)
- # luminus (11)
- # off-topic (8)
- # parinfer (9)
- # pedestal (2)
- # re-frame (19)
- # reagent (1)
- # ring (3)
- # ring-swagger (8)
- # shadow-cljs (278)
- # spacemacs (13)
- # sql (5)
- # testing (7)
- # unrepl (8)
- # yada (25)
Does anyone know if it is possible to use :optimizations :none
and still get a single file? I don’t mean using :main
, which outputs a file that pulls in additional files from out
via document.write
ing <script> tags - I mean actually just getting one JS file that defines goog
and does all the other work necessary to bootstrap cljs
@jeremy.dormitzer you’re probably looking for :optimizations :whitespace
Plus, :whitespace compiles way slower than :none since it still passes through the closure compiler
@jeremy.dormitzer I don’t think you can both get figwheel to work, and have a single file, what do you want to do?
@jeremy.dormitzer if you’re willing to go some distance to achieve this, then I made a chrome extension build task for shadow-cljs that compiles unoptimized code into 1 file https://gist.github.com/hlolli/265b9183566a4c5829d7ee355e3d0998#file-chrome_extension-clj-L47-L52 you could make something similar.
Ha yes, Chrome extensions were exactly the use case for this. I ended up putting together a build system that separates dev resources from prod resources so that I can have unoptimized code with figwheel for dev with a custom manifest.json to support that, and an optimized / single file build for prod with a manifest.json that will get accepted by the app store (no custom CSP)
I'm doing some work using the AWS JS SDK from cljs. I'm using clairvoyant to trace, and I've noticed that some of the JS objects are displayed with Clojure keywords, but are actually only accessible using JS string keys. Do I have a configuration problem? some kind of conversion hapenning en-route to the console?
@jrbrodie77 you must have some clj to js conversion problem. If you have access to this object, did you try doing (clj->js {:edn "data"})
or #js {:edn "data"}
(#js is non-recursive)
clj->js - function
(clj->js x & {:keys [keyword-fn], :or {keyword-fn name}})
Recursively transforms ClojureScript values to JavaScript.
sets/vectors/lists become Arrays, Keywords and Symbol become Strings,
Maps become Objects. Arbitrary keys are encoded to by key->js.
@neupsh there are no great pathways for this and it depends exactly what you want to do. If you’re just packaging, then that’s not too bad. for tests, the best I’ve seen is data.xml, which uses nashorn to integrate it. but most of the contrib projects using clojurescript have a lein file that is used in tandem.
@alexmiller thank you
I am trying to convert a maven based project (spring boot), to leiningen based one with clojure and clojurescript added in the project (java, clj, cljs polyglot)
Is anyone else having advanced compilation issues with a fresh re-frame and/or reagent project, on a machine with JDK 9?
Tiny bit more info: 1. Fresh project created a few minutes ago using re-frame template (https://github.com/Day8/re-frame-template) 2. Added :jvm-opts [“--add-modules” “java.xml.bind”] to :dev profile Otherwise everything is exactly as found in the template generated project.
@goldsmith.tee Yes, FWIW, there is a failure in the ClojureScript unit tests surrounding Java 9 and :advanced
: https://dev.clojure.org/jira/browse/CLJS-2400
@mfikes That definitely looks like it could be the cause. Thanks for the link.
@goldsmith.tee The unfortunate aspect is that it smells like Java 9 can't run Closure
@mfikes That’s a pretty big deal. Damn.
That would be ideal yeah. Might stick with Java 8 for now.
Hi everyone, new to Clojure/Script. Would anyone happen to have a good reference or project with examples on how to modify cljs.test/report, trying to get a report that can be integrated to a CI build that shows tests and code coverage. Kinda like a junit.xml like from test2junit but for clojurescript