Fork me on GitHub

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?


using lein or just deps.edn


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:

(defn start-dev-build []
   (let [build-name "dev"]
     (-> (figwheel-sidecar.config/fetch-config)
      (assoc-in [:data :figwheel-options :server-port] 4578)
      (assoc-in [:data :figwheel-options :nrepl-port]  7777))
    (figwheel-sidecar.repl-api/cljs-repl build-dev)))
as you can see I'm changing port and nrepl port, building the project and then getting the cljs REPL.


how do you read this in .cljs files?


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


I want to compile options into cljs from a config file


Like how closure-defines let me do

Dante T. M.10:12:53

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?


@dante.the.monkey both approaches would probably work


@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.


@danielstockton I guess I don't know what you're trying to accomplish?


Figwheel uses websockets to allow for other domains


I know, figwheel itself isn't the problem, just that it requires :optimizations :none, which means:

document.write('<script src="js/compiled/out/goog/deps.js"></script>');
document.write('<script src="js/compiled/out/cljs_deps.js"></script>');
It means I can't just include the script on another domain, without also hosting the closure deps there too..


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.


you could try setting :asset-path "", might work.


Yeah, never actually tried that because the docs say :asset-path is a relative URL path not a file system path but I could (


doesn't hurt to try it 😉


Happy to report that it seems to work 👍


does anyone know how to make clojurescript compiler warnings into errors?


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


I guess I can do some regex check on the output if there is nothing else available


Hi. defstruct isn't supported in cljs, right?


I was using a one-liner to start a standalone cljs repl, but it is not working anymore, someone knows what is this error?


i just copied and pasted that into my terminal and it worked


yeah, it was working for me too


where is this classpath?


try it in a different directory? possible you're getting a cached classpath from a previous invocation of clj?


same error :thinking_face:


on a brand new folder


i decided to install lumo


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?

Alex Miller (Clojure team)18:12:33

no idea how up to date that is


just found it too 🙂 original search showed me but this seem not working anymore


no easy way to save it and share with others there tho


(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?


@josh.hesketh depends on your definition of "activity" I guess 😄


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


you might want to look at re-frame or fulcro instead


personally I prefer rum, but those are the two with the most activity around them


also, clojure/script is a lot less prone to the "there's no recent activity so it must be dead" problem that seems to plague Javascript

richiardiandrea22:12:43 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


ok, thanks that's useful - it's a beautiful project


any recommendations on blogs or anything i could use?

shaun-mahood22:12:15 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. has quite a few examples of what people have built with re-frame. Both fulcro and re-frame have excellent documentation as well.

💯 4