This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-07
Channels
- # adventofcode (62)
- # babashka (88)
- # beginners (52)
- # boot (2)
- # bristol-clojurians (1)
- # calva (7)
- # cider (15)
- # circleci (4)
- # clj-kondo (12)
- # cljdoc (5)
- # cljsrn (4)
- # clojure (53)
- # clojure-dev (1)
- # clojure-spec (7)
- # clojure-uk (7)
- # clojurescript (25)
- # core-async (14)
- # duct (1)
- # emacs (10)
- # figwheel-main (3)
- # fulcro (11)
- # garden (14)
- # jobs (1)
- # klipse (2)
- # luminus (1)
- # malli (9)
- # re-frame (6)
- # reagent (13)
- # remote-jobs (1)
- # shadow-cljs (124)
- # sql (1)
- # testing (15)
- # tools-deps (13)
- # uncomplicate (1)
- # vim (1)
is there a way to write this more elegantly? I want to have pinkgorilla.events appear only once in all this requires...?
dunno what that syntax is called either ... require lists or something. its basically just nested vectors (:require [pinkgorilla.events [palette kernel [message :as m] doc]])
any idea how to properly reference goog.debug/Console? new clojurescript is giving me a warning, had to escape into js/
land:
https://github.com/binaryage/dirac/commit/efe3b78e4f3718fb848a21e9e87fca419b1072be
i have two cljs files, index.cljs and foo.cljs, which are independent of one another and only used on their respective html pages, index.html and bar.html. i'm having trouble configuring a clojurescript build to generate separate and independent index.js and foo.js files. can anyone here suggest some advice/examples/documentation?
i managed to make a little more progress - i can get the js files to build now:
{:cljsbuild {:builds [{:id :index
:source-paths ["src/cljs/my_app"]
:main "my-app.index"
:jar true
:compiler {:modules {:main {:entries [my-app.index]
:output-to "resources/public/assets/js/main.js"}}
:optimizations :advanced}}
{:id :foo
:source-paths ["src/cljs/my_app"]
:main "my-app.foo"
:jar true
:compiler {:modules {:main {:entries [my-app.foo]
:output-to "resources/public/assets/js/foo.js"}}
:optimizations :advanced}}]}}
i was trying this without modules earlier - that way, i was generating two JS files, but each one seemed to contain all of my cljs
:cljsbuild {:builds [{:id :frontend
:source-paths ["src/cljs/my_app"]
:main "my-app.index"
:jar true
:compiler {:modules {:main
{:entries [my-app.index]
:output-to "resources/public/assets/js/index.js"}
:foo
{:entries [my-app.foo]
:output-to "resources/public/assets/js/foo.js"}
:cljs-base
{:output-to "resources/public/assets/js/cljs_base.js"}}
:optimizations :advanced}}]}