This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (202)
- # aleph (8)
- # announcements (13)
- # architecture (1)
- # aws (2)
- # beginners (201)
- # boot (1)
- # bristol-clojurians (1)
- # calva (2)
- # cider (23)
- # cljs-dev (22)
- # cljsrn (2)
- # clojure (105)
- # clojure-bangladesh (1)
- # clojure-berlin (8)
- # clojure-dev (104)
- # clojure-europe (3)
- # clojure-italy (5)
- # clojure-losangeles (1)
- # clojure-nl (24)
- # clojure-russia (55)
- # clojure-spec (44)
- # clojure-uk (19)
- # clojurescript (58)
- # component (58)
- # cursive (3)
- # data-science (1)
- # datomic (27)
- # duct (6)
- # events (6)
- # figwheel-main (6)
- # fulcro (15)
- # jobs (3)
- # kaocha (5)
- # luminus (1)
- # music (1)
- # nrepl (2)
- # off-topic (24)
- # onyx (1)
- # pedestal (3)
- # protorepl (8)
- # re-frame (18)
- # reagent (39)
- # reitit (1)
- # remote-jobs (1)
- # ring (15)
- # rum (11)
- # shadow-cljs (5)
- # sql (8)
- # tools-deps (12)
- # vim (7)
is there an easy way to generate an externs file? i'm trying to include bootstrap 4's dist version from NPM as a foreign lib (which i don't think exists in cljsjs) and the whole thing blows up with advanced optimization. i've tried
:infer-externs true with
*warn-on-infer* without luck.
Anyone know of an up-to-date starter/template for creating a library project targeting cljs and clj?
Is there a way to parameterize a clojurescript build with a map? I have a complex map I want to inject in.
@dominic.freeston You have a couple of options here, for example with figwheels api you could put this in your dev/user namespace an programatically access the cljs build options:
as you can see I'm changing port and nrepl port, building the project and then getting the cljs REPL.
(defn start-dev-build  (let [build-name "dev"] (figwheel-sidecar.repl-api/start-figwheel! (-> (figwheel-sidecar.config/fetch-config) (assoc-in [:data :figwheel-options :server-port] 4578) (assoc-in [:data :figwheel-options :nrepl-port] 7777)) build-name) (figwheel-sidecar.repl-api/cljs-repl build-dev)))
not sure I understand the question? Figwheel (and other build tools) work server-side. You'd typically put such helper functions in the default namespace, get the clj REPL, run it, get the cljs REPL
Hi. I've been porting a flask-based website (so lots of hiccup) to an SPA based on reagent. It's going well. However, now at the stage where an app is being considered to support it. Given Clojure Android seems to be a dead end, is there a consensus on whether react native or a progressive web app is the best way to deliver an app/app-like product with cljs?
Asked before, but didn't see an answer. Is there any compiler flag that will allow me to produce a single js with
:optimizations :none. I would like to use figwheel in a situation where the domains don't match.
Or at least produce absolute instead of relative links to the goog deps?
@danielstockton I think not enough information to provide further guidance - but
:whitespace optimizations will do that
@dnolen I don't think figwheel can work with
:whitespace? I'm doing it currently with
:simple and having to forego figwheel.
The problem is that i'm including the script on e.g.
localhost:1234 and figwheel server is running on
localhost:4321 so when it
document.writes closure deps they're 404.
I know, figwheel itself isn't the problem, just that it requires
:optimizations :none, which means:
It means I can't just include the script on another domain, without also hosting the closure deps there too..
document.write('<script src="js/compiled/out/goog/deps.js"></script>'); document.write('<script src="js/compiled/out/cljs_deps.js"></script>');
If i could change those urls to
localhost:1234/js/compiled/out/goog/deps.js then problem solved..
@danielstockton you are serving the initial .js file from
1234 why not serve the rest also? just need to serve the files, nothing special to them?
I could, but they're separate projects and it's just a bit inconvenient to have them linked in that way.
Yeah, never actually tried that because the docs say
:asset-path is a relative URL path not a file system path but I could (https://clojurescript.org/reference/compiler-options#asset-path)
I found in a very old blog post that you could use
:warning-handlers but it doesn't seem to do anything and it's not in https://clojurescript.org/reference/compiler-options
I guess I can do some regex check on the output if there is nothing else available
I was using a one-liner to start a standalone cljs repl, but it is not working anymore, someone knows what is this error?
try it in a different directory? possible you're getting a cached classpath from a previous invocation of clj?
hello, i bet this question is asked a lot, but still cannot find the answer easily. is there any jsfiddle like browser app for clojurescript?
just found it too 🙂 original search showed me http://cljsfiddle.net/ but this seem not working anymore
How come the special value of "4" is used here, instead of another (hex)? This is from https://github.com/clojure/clojurescript/blob/39f47c3b840815d338b27bd864fb33115e73c24a/src/main/cljs/cljs/core.cljs#L11123-L11134
(Oh, I think it indicates the kind of UUID, this being random vs namespaced or time based.)
Hi, i've taken a look at clojurescript a few times over the past few years and always wanted to build things with it but never had the time. I finally have the time and honestly, it's feeling like there's not a lot of activity or community around this anymore. Am i looking in the wrong places or is this the state of clojurescript?
i'm struggling to find projects with much recent activity.. did om/next ever come to fruition? what's the best resources for getting to grips with all the different tooling
om.next has not received any love lately, fulcro is an idea based on that work
by far most folks either use plain reagent or re-frame...but there are many frameworks scattered around
https://youtu.be/yyVKf2U8YVg is probably the most exciting thing I've seen lately - haven't had a chance to play with any of it yet but it's a very promising set of tools for full-stack applications. https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md has quite a few examples of what people have built with re-frame. Both fulcro and re-frame have excellent documentation as well.