This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-07
Channels
- # announcements (1)
- # babashka (77)
- # beginners (219)
- # chlorine-clover (6)
- # cider (52)
- # clj-kondo (14)
- # cljdoc (5)
- # clojure (173)
- # clojure-europe (49)
- # clojure-finland (1)
- # clojure-germany (2)
- # clojure-italy (1)
- # clojure-nl (39)
- # clojure-sweden (4)
- # clojure-uk (51)
- # clojurescript (25)
- # code-reviews (9)
- # conjure (25)
- # data-science (2)
- # figwheel-main (6)
- # fulcro (74)
- # graalvm (1)
- # graphql (11)
- # jobs-discuss (17)
- # keechma (4)
- # lein-figwheel (4)
- # leiningen (1)
- # luminus (10)
- # malli (14)
- # mid-cities-meetup (2)
- # off-topic (28)
- # re-frame (5)
- # reagent (76)
- # reitit (30)
- # ring (7)
- # ring-swagger (1)
- # shadow-cljs (163)
- # spacemacs (11)
- # specter (2)
- # sql (43)
- # tools-deps (13)
- # vim (6)
- # yada (1)
Is there any other documentation on production builds with figwheel-main outside of https://figwheel.org/tutorial.html#packaging-up-a-single-compiled-artifact-for-production?
I followed this but now I see a lot of websocket related errors in the console, which lead me to believe that the ws part of figwheel is still part of the production compilation result
Hi, I'm trying to convert a stripe elements object to clojurescript, but it isn't really working:
var element = elements.create('card', {
style: {
base: {
iconColor: '#c4f0ff',
color: '#fff',
fontWeight: 500,
fontFamily: 'Roboto, Open Sans, Segoe UI, sans-serif',
fontSize: '16px',
fontSmoothing: 'antialiased',
':-webkit-autofill': {
color: '#fce883',
},
'::placeholder': {
color: '#87BBFD',
},
},
invalid: {
iconColor: '#FFC7EE',
color: '#FFC7EE',
},
},
});
to:
(.create elements "card" {:style
[{:base
{
:fontFamily "Gotham-Light, Helvetica, sans-serif"
}
}
{:invalid
{:color "#FFC7EE"}
}]
})
But so far it doesn't work@pshar10 you are handing CLJS data structures when it just expects JS objects, call (clj->js {:style ...})
I see in the js version style is a map with the keys base and invalid but in your cljs version style is a vector with two maps, each of which has a single key
I also wrapped the :base's value and the :invalid's value in an array, and console.log'd:
another attempt that doesn't work:
(clj->js
{:style
{:base
[{
:fontFamily "Gotham-Light, Helvetica, sans-serif"
:color "green"
:fontSize 16
}]
:invalid
[
{:color "#FFC7EE"}
]
}
}
)
This shows the stripe element, but not the text within it:
(clj->js
{:style
{:base
{
:fontFamily "Gotham-Light, Helvetica, sans-serif"
:color "#FFC7EE"
:fontSize 16
}
:invalid
{:color "#FFC7EE"}
}
}
)
Oh, that's because Gotham-Light has been imported through @font-face in my css, which doesn't concern stripe, I think.
I have another question. How do I find out what the directory this cljs file is running in so that I can use relative paths?
to use the Gotham-Light font-face imported in my css, I do (.elements stripe {:fonts [{:cssSrc "resources/public/css/style.css"}]} ) But it doesn't work
if you're using deps.edn then "resources" is usually on the path ex: {:paths ["src/main" "resources"]
but there may be local web server config that uses public
as the asset root so you may try /css/style.css
as well
I'm trying to make a cljsjs package for snabbdom
I tried following the guide and have this so far: https://github.com/mitchdzugan/packages/commit/8f2fb0cb1ea248566824a64d0906a1d9995c471e
but whenever I try to run boot package
I get
Downloading v0.7.4.zip
Extracting 84 files
Sifting output files...
Sifting output files...
java.lang.Thread.run Thread.java: 834
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 628
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1128
java.util.concurrent.FutureTask.run FutureTask.java: 264
...
clojure.core/binding-conveyor-fn/fn core.clj: 1938
boot.core/boot/fn core.clj: 1031
boot.core/run-tasks core.clj: 1022
cljsjs.boot-cljsjs.packaging/eval3198/fn/G/fn packaging.clj: 106
cljsjs.boot-cljsjs.packaging/eval3086/fn/fn/fn packaging.clj: 59
boot.task.built-in/eval2350/fn/fn/fn built_in.clj: 636 (repeats 2 times)
cljsjs.boot-cljsjs.packaging/eval3272/fn/fn/fn packaging.clj: 229
cljsjs.boot-cljsjs.packaging/build-legacy-deps-cljs packaging.clj: 125
java.lang.AssertionError: Assert failed: No .ext.js file(s) found!
(first externs)
clojure.lang.ExceptionInfo: Assert failed: No .ext.js file(s) found!
(first externs)
line: 30
anyone familiar with cljsjs see anything obvious I'm missingI just typo'd the cljsjs
directory as clsjs
lol
In the context of doing a js/fetch does this error mean anything to anyone?
VM95162:1 Uncaught (in promise) TypeError: Failed to execute 'fetch' on 'Window': The object must have a callable @@iterator property.
nevermind. figured it out, that error message was useless to me