This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-10
Channels
- # announcements (5)
- # aws (18)
- # babashka (1)
- # beginners (81)
- # calva (7)
- # chlorine-clover (1)
- # cider (5)
- # cljs-dev (8)
- # clojure (125)
- # clojure-dev (1)
- # clojure-europe (31)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-norway (1)
- # clojure-spec (5)
- # clojure-sweden (1)
- # clojure-uk (31)
- # clojurescript (85)
- # code-reviews (1)
- # core-async (17)
- # cursive (39)
- # datomic (16)
- # emacs (1)
- # fulcro (6)
- # java (16)
- # kaocha (2)
- # luminus (4)
- # malli (2)
- # off-topic (65)
- # pathom (3)
- # re-frame (11)
- # reagent (5)
- # remote-jobs (1)
- # rum (5)
- # sci (10)
- # shadow-cljs (24)
- # spacemacs (4)
- # test-check (3)
- # tools-deps (22)
- # xtdb (15)
Hi, is there a recommend way to reduce size of generated *.js? My first clojure-script project (https://github.com/DomainDrivenArchitecture/dda-masto-embed) generates 2,3M minimized js - I think that's quite large ... how should I start my quest for shrink the resulting size??
@jerger_at_dda don't use {:optimizations :simple}
. that is pretty much the reason its so large.
I assume closure compilers ADVANCED_OPTIMIZATIONS
will map to {:optimizations :advanced}
?
then use https://shadow-cljs.github.io/docs/UsersGuide.html#_build_report to figure out the rest. I know that cljs-time is a pretty significant chunk too (because of its deps, not so much cljs-time itself)
depending on what you use from it you might be better off with the code from the closure library. its about 5% the size of cljs-time.
optimization cut the size down to 1,5M Will investigate further with build-report ... thanx for your help 🙂
Is there a way to get a kind of dependency tree reported ?
How to compile a node script where I can pass command line arguments?
:builds
{:converter {:target :node-script
:output-to "converter.js"
:main converter/run
}
}
I'd like to be able to do something like node converter.js group user
(which would only convert groups and users)?@jerger_at_dda no tree/graph currently no
@kurt.sys that's sth we solved in https://github.com/yogthos/mastodon-bot
(see package.json, shadow-cljs.edn, core.cljs). You can install with sudo npm install mastodon-bot -g
and run with mastodon-bot -h
if example is good enough
you can use something like https://github.com/clojure/tools.cli to parse the args