This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-04
Channels
- # arachne (1)
- # beginners (41)
- # boot (92)
- # capetown (8)
- # cider (10)
- # cljsjs (4)
- # cljsrn (42)
- # clojure (94)
- # clojure-india (1)
- # clojure-russia (48)
- # clojure-sanfrancisco (1)
- # clojure-spec (34)
- # clojure-uk (13)
- # clojurescript (29)
- # cursive (12)
- # datavis (4)
- # datomic (10)
- # dirac (63)
- # editors-rus (16)
- # emacs (57)
- # funcool (5)
- # hoplon (22)
- # jobs (2)
- # lein-figwheel (3)
- # leiningen (5)
- # onyx (51)
- # other-languages (2)
- # proton (1)
- # protorepl (2)
- # re-frame (34)
- # remote-jobs (1)
- # sfcljs (5)
- # spacemacs (1)
- # specter (2)
- # sql (20)
- # test-check (54)
- # yada (1)
I'm trying to get dynamic modules working for my app and I've got a few problems I'm totally unsure how to solve; is there anybody who got it running here so I can ask about your setup?
Hello all, does anyone have recommendations for how to manage configuration in browser-based ClojureScript? Eg, I’m looking for something that will provide me the proper URLs for my back-end services in QA vs staging vs production environments
Ideally without exposing all the URLs for all three environments in production, so something that could process stuff at compile-time, not runtime
Right now I’m conditionally including one of three directories in my build-path, but it seems really hacky, especially with lein-cljsbuild
@timgilbert: we have another script included in page with just the ENV specific configuration (JSON stored in global variable) that can be easily generated/scripted during deployment to specific environment. We are reading the content of the global variable in main entry point and then injecting it as Map where needed.
Interesting, thanks. That's similar to the approach I'm taking right now
It would be nice to be able to use some kind of library or something for it though, and not have to break out of Clojure to do it
@timgilbert: I used to use environ
library to configure my code, recently I’ve learnt another technique, how to read configuration directly via cljs compiler’s config: https://github.com/binaryage/cljs-devtools/blob/9c2eda4f289761d88d61d0088a167bae594b4b0c/src/lib/devtools/preload.clj#L3
when you have config accessible from clojure, you can decide to expose some of it to your clojuescript code via a macro
https://github.com/binaryage/cljs-devtools/blob/9c2eda4f289761d88d61d0088a167bae594b4b0c/src/lib/devtools/preload.clj#L10 https://github.com/binaryage/cljs-devtools/blob/9c2eda4f289761d88d61d0088a167bae594b4b0c/src/lib/devtools/preload.cljs#L9
@timgilbert: adzerk's env
is a nice and simple solution https://github.com/adzerk-oss/env
@darwin: I've got some software that has a built-in version of Chromium that I'm going to be developing against, and as far as I can tell it doesn't have the option to enable custom formatters in it's devtools menus so I can't use cljs-devtools with it. Is there anything in cljs-devtools that will work without enabling custom formatters?
@shaun-mahood: what is the version of Chromium? or SHA
@darwin: No idea, and no idea how to tell. Is there a command I can run at the console? I can't find any chromium executables anywhere so I'm assuming it's baked in to the product.
anyways, if it is not exposed in embedded devtools, chances that you could make it work are slim
Ok, version is 33.0.1750.170 (have to hardcode the URL to load it in)
if you are going to live with this ancient version for longer, I would recommend to invent a workflow for working against latest outside and then just port the result inside this old one
Ok, figured that was going to be the case - thanks for the help. Pretty exciting anyway, I think I'll be able to use cljs with all the figwheel+devcards goodness where the previous workflow was <make change> -> <start debugger> -> <run program> -> <manually load dll> -> <run changed command>
you would have to write JSON-ML renderer similar to what is implemented in DevTools console
Yeah, I've done some in page console stuff before so I'll live with that - this is a brand new version so the very soonest there would be a chromium update would be next year.
but the hard part of formatting cljs values in JSON-ML would be provided by cljs-devtools
Oh that's a good idea, if I end up really needing it I'll steal your hard work.