This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-20
Channels
- # aws-lambda (7)
- # beginners (113)
- # boot (17)
- # cider (4)
- # cljs-dev (4)
- # clojure (65)
- # clojure-greece (3)
- # clojure-italy (7)
- # clojure-russia (10)
- # clojure-spec (37)
- # clojure-uk (20)
- # clojurescript (76)
- # community-development (2)
- # cursive (24)
- # data-science (9)
- # datomic (9)
- # emacs (1)
- # fulcro (2)
- # graphql (11)
- # hoplon (13)
- # juxt (15)
- # leiningen (1)
- # off-topic (36)
- # om (1)
- # onyx (59)
- # parinfer (41)
- # pedestal (7)
- # portkey (60)
- # protorepl (4)
- # re-frame (345)
- # reagent (7)
- # ring-swagger (16)
- # shadow-cljs (121)
- # spacemacs (30)
- # sql (6)
- # uncomplicate (2)
- # unrepl (9)
- # vim (13)
- # yada (2)
lein new re-view xyz;
cd xyz;
yarn install;
# node_modules/shadow-cljs is correct
lein figwheel;
# node_modules/shadow-cljs is empty
if you run those lines above, do you see the same thing? would hope it is not something specific to my machine
thats why shadow-cljs now detects if there is a yarn.lock
and then uses yarn
to install npm deps 😉
i was hoping to be able to use this re-view template as a nice way to compare things between shadow and cljsbuild
i see, i can put npx
commands into "scripts"
in package.json so the user still just runs npm run ...
to activate the script
"scripts": {
"deps": "npm install; npx shadow-cljs npm-deps;",
"watch": "npx shadow-cljs watch browser;",
"release": "npx shadow-cljs release browser;"
},
bit of formatting feedback, the website URL when running watch
and so is a bit hidden in the stream, and the other urls (server/socket-repl/nrepl) more obvious. for a tutorial context it might be hard to explain where a user should look
yarn watch
with "watch": "npx shadow-cljs watch browser;"
then uses npx
right? so only fake yarn
😛
@mhuebert right, I do think that "watch": "shadow-cljs watch browser;"
will use the correct thing as well. shouldn’t need npx
but would need to think about what to do with warnings that the user is not in control of
they do, that error comes up sometimes. i think you can get around it by deleting the out
folder
a shadow release is ~25sec vs 38.5sec for lein cljsbuild once prod
but not really apples to apples because cljsbuild is running the JS through closure
[zilence@zpro ~/code/tmp/xyz]$ lein cljsbuild once prod
Compiling ClojureScript...
[zilence@zpro ~/code/tmp/xyz]$
EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering,
Sh`.`
at least the shadow-cljs release
build works as expected. I happily trade 6kb gzip’d for that 🙂
hehe .. yeah the closure support has long ways to go … I fixed the shadow-cljs side but it doesn’t work at all
also with cljsbuild I get a JSC_MISSING_PROVIDE_ERROR
unless I delete the out
folder in-between builds