This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-16
Channels
- # atlanta-clojurians (1)
- # aws (1)
- # beginners (65)
- # boot (4)
- # cider (81)
- # cljs-dev (25)
- # cljsrn (27)
- # clojure (129)
- # clojure-dusseldorf (12)
- # clojure-italy (68)
- # clojure-norway (5)
- # clojure-poland (4)
- # clojure-spec (14)
- # clojure-uk (72)
- # clojurescript (144)
- # code-reviews (19)
- # copenhagen-clojurians (5)
- # cursive (16)
- # datomic (21)
- # editors (1)
- # emacs (15)
- # events (1)
- # figwheel (6)
- # fulcro (54)
- # graphql (1)
- # hoplon (24)
- # jobs (6)
- # jobs-discuss (2)
- # keechma (4)
- # leiningen (6)
- # luminus (17)
- # lumo (2)
- # off-topic (43)
- # onyx (6)
- # pedestal (2)
- # perun (2)
- # portkey (3)
- # re-frame (22)
- # reagent (11)
- # ring-swagger (5)
- # shadow-cljs (46)
- # specter (8)
- # test-check (2)
- # testing (3)
- # vim (16)
- # yada (1)
@tony.kay the hud works just fine for me when running lein new fulcro app shadow-cljs demo
and shadow-cljs watch test
with 2.2.31
?
no wait. didn't edit the project.clj. assumed the package.json version was used. doesn't work with 31 indeed.
fixed in 32. the dynamic discovery I added in 30 forgot to add the devtools after discovery.
can I use :npm-module
target for expo to build a release version? (also should provide a index.js manually)
@doglooksgood I added release
support in 2.2.31
when you run shadow-cljs release
it generates an optimized.ios.js
in the :output-dir
that should work fine with the default exp/react-native tools when you use that as the entry
I didn't try exp build
or any of the release stuff since it asked me a bunch of questions I didn't want to answer at the time
question: I am setting up my release toolchain starting with a simple one. Given I have a release build setup
...
:simple-deploy {:target :browser
:output-dir "resources/public/simple-deploy/js/"
:modules {:main {:entries [simple-deploy.core]}}
}
...
and a simple reagent mini app... with a single dependency on reagent
(ns simple-deploy.core
(:require [reagent.core :as r]))
...
...
;; app code
...
...
(defn ^:export run []
(r/render [simple-example]
(js/document.getElementById "app")))
when I run shadow-cljs release simple-deploy --debug
I get...
[:simple-deploy] Compiling ...
Closure compilation failed with 1 errors
--- EXTERNS:/Users/javierabanses/.m2/repository/cljsjs/d3/4.2.2-0/d3-4.2.2-0.jar!/cljsjs/d3/common/d3.ext.js:670
Object literal contains illegal duplicate key "scaleSequential", disallowed in strict mode
so the question is? when/why is d3 being included?
NOTE: this is the first time i've run shadow-cljs release ...
so maybe it is scanning the local maven repo for indexing or something?
thanks in advance.@fj.abanses Hm. Can you search bundle-info.edn for d3?
@thheller Now I have released an update to Calva with the much lacking shadow-cljs support added. https://marketplace.visualstudio.com/items?itemName=cospaia.clojure4vscode
There are still some quirks that I don’t have the time to elaborate on right now, but nothing that should be a stopper. Also, I have no idea how this works for other projects than browsers. So anyone who would like to try that out and provide me feedback will become my hero.
@alex-dixon.. not familiar with that file... is it in the .shadow-cljs folder?
@fj.abanses Yeah but it looks like you might need to follow the instructions here to generate it: https://clojureverse.org/t/help-wanted-release-bundle-size-visualization/871/9
@fj.abanses I’m actually not sure how helpful that will be. Also appears manifest.edn contains similar information
@alex-dixon thanks! I am gonna check manifest.. and then the bundle...
@alex-dixon when running
npx shadow-cljs clj-repl
shadow-cljs - config: /Users/zilence/code/shadow-cljs/shadow-cljs.edn version: 2.0.101
shadow-cljs - connected to server
shadow-cljs - REPL - see (help), :repl/quit to exit
[11:0]~shadow.user=> (shadow/release-snapshot :simple {})
:simple
being build id
i get
ExceptionInfo closure errors clojure.core/ex-info (core.clj:4739)
keep in mind shadow-cljs release :simple
never finished and exited with an error... so maybe this means there is nothing to examine...@fj.abanses Oh. Didn’t see that. That makes sense. I think it runs the release first in order to analyze it
@alex-dixon is there a lein clean
equivalent or even need for it? I am very new to the tool and can't see any in the docs
@fj.abanses i just delete the artifacts.
@alex-dixon @pez it just worked as soon as i stopped the repl i was running...
@fj.abanses There isn’t a clean equivalent. I raised it as an issue here: https://github.com/thheller/shadow-cljs/issues/242
@fj.abanses the problem is most likely cljsjs.d3
on your classpath.
currently shadow-cljs uses the externs from any cljsjs package. probably should not do this anymore but it seems like a good idea in the beginning.
didn't think that this would ever be a problem but I guess there are some broken externs for d3
how do I use shadow-cljs clj-run some.namespace/-main arg1 arg2 arg3 with flags that is normal input for something like tools.cli?
because -a arg1 -b arg2 ...
etc. throws with a shadow-cljs clj-run “unrecognized argument”
do I have to use some magic string or some other unix trick to make shadow-cljs ignore the arguments?
How do you upgrade shadow-cljs? I can see that the version is specified in package.json
and project.clj
. So I can change it to say '2.3.0' in both those places. Then what do I need to do? I never saw this outlined in the documentation, yet everyone seems to be doing it. If I just run npx shadow-cljs watch main
(the only command I ever run) the version change is not picked up.