This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-10
Channels
- # announcements (2)
- # babashka (15)
- # beginners (174)
- # calva (16)
- # chlorine-clover (10)
- # clara (7)
- # clj-kondo (27)
- # cljdoc (10)
- # clojars (4)
- # clojure (50)
- # clojure-europe (10)
- # clojure-gamedev (3)
- # clojure-greece (1)
- # clojure-italy (4)
- # clojure-losangeles (1)
- # clojure-nl (16)
- # clojure-sg (1)
- # clojure-spec (7)
- # clojure-uk (41)
- # clojurescript (22)
- # data-science (15)
- # datascript (38)
- # datomic (2)
- # duct (15)
- # emacs (2)
- # fulcro (110)
- # funcool (9)
- # graphql (10)
- # jackdaw (8)
- # jobs (23)
- # joker (1)
- # leiningen (15)
- # luminus (1)
- # malli (20)
- # off-topic (26)
- # pathom (5)
- # pedestal (1)
- # reitit (19)
- # shadow-cljs (78)
- # spacemacs (2)
- # sql (52)
- # tools-deps (99)
- # vim (13)
FROM circleci/clojure:openjdk-11-tools-deps-1.10.0.414-node
seems to be an ok start..After this commit https://github.com/thheller/shadow-cljs/commit/8a90e62c6af3ece959d39b8d26c49d3bc72159b6 my web worker explodes with Uncaught ReferenceError: window is not defined
and I guess it is because it tries to load /shadow/cljs/devtools/client/browser.cljs
instead of /shadow/cljs/devtools/client/worker.cljs
.
My :modules config has this form
{:base {:entries [cljs.core]}
:mod {:entries [my.ns]
:depends-on #{:base}}
:worker {:entries [my.ns.worker]
:depends-on #{:base}
:web-worker true}}
@UKQS17P3L set :devtools {:browser-inject :mod}
I'm also in trouble with react-native target trying to access js/document. But I downgraded fulcro with shadow-cljs at once because I run out of time (so I can't be sure about shadow-cljs or fulcro issue).
@thheller it worked, thank you! Is this documented somewhere? I am usually referencing this guide https://shadow-cljs.github.io/docs/UsersGuide.html
no I still need to document it. I added it because previously workers didn't support hot-reload but now they do
Does shadow-cljs support using locally installed folders?
npm install <folder>:
Install the package in the directory as a symlink in the current project. Its dependencies will be installed before it's linked. If <folder> sits inside the root of your project, its dependencies may be hoisted to the toplevel node_modules as they would for other types of dependencies.
I haven’t had any success with this so far, if anyone finds anything - please let me know 🙂
I updated to the latest shadow-cljs 2.8.83 and now I see this in the Chrome console. I assume it must be using some character that my system does not have. I'm on Ubuntu 19.10.
Oh, right - this computer is PopOS which is a flavor of Ubuntu. They definitely could use a different font.
https://github.com/pop-os/gtk-theme#recommendations > Interface: Fira Sans Book 10
yeah I removed color because it was causing problems for users with dark mode themes
still wanted something to "stand out" ... this seemed like a "standard" unicode char
What's it supposed to be? I'd like to put a picture to the "rightwards finger-post arrow" hjaha
Can i goog-define
some constant in some namespace ns.a
and use it in another ns.b
? This doesn't seem to work if I require the ns.a
from ns.b
Hello. I'm attempting to use https://github.com/priornix/antizer which is a wrapper around the antd
package. Antizer pulls the antd package
in through cljsjs, which causes bloat in my local development environment due to the size of the antd package.
My thought was to change antizer to use shadow-cljs so we can target specific elements of the package, rather than importing the whole thing. We don’t know what the user would like to import, so I’m stuck on how to conditionally require parts of antd from antizer.
One way I can think to handle this is to create a different file for each Antizer import that maps directly to an antd import. Ex:
antizier.Button
=> antd/Button
and then requiring the relevent element from antizier.
Another way (that I think would work?) would potentially be to keep track of each distinct element that is called in antizier and calling (require)
for each.
Does anyone know of a better way to handle this?
@mazin unfortunately requires must be static, so you cannot conditionally require things in CLJS. (require)
is a macro that only works in development
@thheller would you accept a PR with this? https://gist.github.com/darwin/f9e883eef4629d462edc871b6830a4d5 …so I could drop my hacked version of shadow-cljs
https://github.com/thheller/shadow-cljs/commit/94c99bd609bf674e24b47964d37c89e57e838414

btw. this could also solve some old issues with dirac+node.js https://github.com/binaryage/dirac/blob/master/docs/node.md#source-maps
I only added it because it seems to be the only way to make chrome exts load source maps
I still think adding that :source-map-prefix
could be helpful for some future ad-hoc workarounds in similar cases when I want source maps to be server independently
we don’t need to document it, it will be just hidden option for desperate people like me who go digging… ;()
as for the other stuff one option is instead of loading the content-script file directly
I tried that, but gave up, fetch part was easy, but I was running into google.provide throwing that namespaces were already declared
that seems to work fine but requires adding https://developer.chrome.com/extensions/manifest/web_accessible_resources which is a bit annoying
but you have better understanding of the whole closure thing, so you probably know how to do it properly
nevcermind, I was probably doing some other mistakes, it wasn’t clear to me how to configure the build properly, that the code I’m fetching is a module which depends on what is already present in the shim
probably because you were still accessing files from the dev server isntead of the extension
ok, so you found a solution without relaxing manifest rules? via chrome.runtime.getURL
?
kind of getting back into shadow - and not getting something. My intent is to package my simple cljs file into a script that I can run anywhere node runs, but I get missing dependencies at runtime.
@hoppy I recommend post-processing the file with https://github.com/zeit/ncc if you want to package ALL dependencies into the file