This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-05
Channels
- # adventofcode (419)
- # aleph (8)
- # aws (6)
- # beginners (148)
- # boot (9)
- # cider (24)
- # cljs-dev (37)
- # cljsjs (8)
- # clojure (134)
- # clojure-android (6)
- # clojure-brasil (15)
- # clojure-dev (8)
- # clojure-dusseldorf (2)
- # clojure-greece (67)
- # clojure-italy (8)
- # clojure-japan (3)
- # clojure-russia (3)
- # clojure-spec (8)
- # clojure-uk (13)
- # clojurescript (54)
- # clojurex (6)
- # cursive (5)
- # data-science (12)
- # datomic (15)
- # defnpodcast (11)
- # emacs (25)
- # fulcro (95)
- # graphql (3)
- # lein-figwheel (1)
- # leiningen (27)
- # luminus (1)
- # lumo (6)
- # mount (2)
- # off-topic (112)
- # om (3)
- # onyx (24)
- # perun (3)
- # re-frame (20)
- # reagent (1)
- # reitit (2)
- # ring-swagger (13)
- # rum (10)
- # shadow-cljs (45)
- # spacemacs (24)
- # sql (2)
- # unrepl (78)
- # yada (1)
As I understood it, from this article on the wiki:
https://github.com/thheller/shadow-cljs/wiki/Custom-builds
I can create a custom build to add some extra steps to the build process, e.g. compile sass to css. Once I have a custom build I can start it with a command like shadow-cljs watch compile-css app
, where app
is the build targeting the browser. Is it correct? or what is the recommended way to add some extra steps to the build (e.g. compile sass)?
that fn can use (shadow.cljs.devtools.api/get-build-config :app)
if it needs the config
ok, thanks, my idea is to add a custom build to be able to build a complete website with just one command
I understand the desire to make it part of the build but I don’t recommend starting with that
I have not yet settled on a proper API for “plugins” but sass would probably be a plugin
yes. the basic theme will probably be like this: you provide a function for shadow-cljs
to call when starting
that function in turn can modify the server and register additional “hooks” it wants
but … write plain clojure code with no dependecy on shadow-cljs
until you REALLY need to
just one more question, the wiki article says The state is a clojure map representing the full shadow-build compiler state. TBD: open an issue if you want to know more about this.
can you point me to where to find more info about it?
anything specific you want to know? there are no docs for this apart from the code itself
I think here: https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/build/data.clj , right?
probably best to just look at the default targets, eg. https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/build/targets/browser.clj#L505-L525