This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-14
Channels
- # announcements (1)
- # beginners (13)
- # calva (2)
- # cider (43)
- # cljdoc (11)
- # clojure (16)
- # clojure-spec (10)
- # clojure-uk (6)
- # clojurescript (7)
- # code-reviews (3)
- # core-matrix (1)
- # datascript (4)
- # datomic (7)
- # devcards (4)
- # figwheel-main (12)
- # fulcro (27)
- # hoplon (1)
- # lein-figwheel (1)
- # luminus (1)
- # nrepl (23)
- # off-topic (4)
- # planck (1)
- # re-frame (8)
- # reagent (7)
- # shadow-cljs (61)
- # spacemacs (7)
- # tools-deps (19)
I am trying to use shadow-cljs for a Jira Addon, but when I load shadow in watch mode, there is apparantly alread a goog.string defined and some other stuff which clashes and make the whole dev mode of shadow fail. Anyone here know a trick to prevent that?
I am getting all kind of errors like this ๐
@mitchelkuijpers hmm thats odd. is there already a goog
version loaded on the page?
@thheller Yes there is already something there
@mitchelkuijpers you can probably "fix" the warning by adding :prepend "goog.isProvided_ = function(name) { return false; };
to your base module
Damn this is annoying it seems my code get's overwritten again.. ๐
Jira uses it for i18n and soy templates
Is it possible to make google closure use another base instead of goog
?
Damn even during production they still have a goog ns.. So my only change for getting this to work would be to use another prefix I would think.
Lol I currently fixed it by doing: goog = {};
I did not get the :prepend
option working for some reason during dev is it possible to set it with the :devtools
option?
But this of course makes fulcro-inspect
stop working but I can live with that for now
but it may break a bunch of stuff in other places if you just overwrite the already loaded code
I'm trying to use https://github.com/gregthebusker/react-confirm-bootstrap#readme in one of my shadow-cljs projects. So far, I've been able to add other components, but I seem to fail this one: The example in js:
var Confirm = require('react-confirm-bootstrap');
var ConfirmAction = React.createClass({
onConfirm() {
// Preform your action.
},
render() {
return (
<Confirm
onConfirm={this.onConfirm}
body="Are you sure you want to delete this?"
confirmText="Confirm Delete"
title="Deleting Stuff">
<button>Delete Stuff</button>
</Confirm>
)
},
});
I'd expect something in cljs like this:
(ns ....
(:require ["react-confirm-bootstrap" :default Confirm]))
[:> Confirm {:body "question"
:title "whatever"
:onConfirm #(println "confirmed")}
[:span "push me"]]
There are no errors or warnings, but when clicking 'push me', nothing happens...Not sure if it's reagent or shadow-cljs related, actually ๐
@kurt-o-sys probably ["react-confirm-bootstrap" :as Confirm]
not :default
when I use :as
: Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
not sure about that library... may be something weird in there.
@thheller I think I am first going to check if I can turn the other one in release mode
@kurt-o-sys maybe it just doesn't support a span?
๐
[:> Confirm {:onConfirm #(println "test")
:title "title"
:body "body"}
[:button "test"]]
still nothing happens ๐oh, ok... so, no way to solve that one?
ok, will try ๐
oh, right. may work fine - although I wanted just an icon there, but well...
https://github.com/gregthebusker/react-confirm-bootstrap/blob/master/src/Confirm.js#L72-L90
lol, you know what, it seems it does work, but I can't see the dialog that pops up... It's hidden behind the other stuff for some reason.
trying, but nope. Not sure where it's gone.
ok... so it's the opacity that was set to 0, and fade didn't seem to work fine.
Is it possible to make google closure use another base instead of goog
?
@mitchelkuijpers its not just goog
. any other namespace will have the same issues (eg. cljs.core
). but no there is no way to adjust that
@thheller Iโm giving a bit of hammock time to my static site generator and was just wondering where I can follow your thoughts and updates on building a โGatsby likeโ system and the plugin system you mentioned some time ago that you will be adding for stuff like Sass. Would like to ensure what I end up building is in the right direction.
@grounded_sage I can't give you any details since I don't have them myself yet
the plugin system is actually already implemented so there is nothing left to do there
I'm playing with fulcro shadow-cljs template (nodemo) and I'm working through the fulcro book. I've been able to adapt the template to follow along with the book, but I'm getting the following compiler error when trying to build the :cards build:
The required namespace "cljsjs.marked" is not available, it was required by "devcards/util/markdown.cljs".
Hmmm, I wonder if I have an old version of devcards running since I can't see any dependency on cljsjs.marked in the devcards project.clj on github.
Ok I see that devcards "0.2.6" does have this dependency and the shodow-cljs documentation says that the solution is to npm install marked
but the error still occurs.
Hmmm, I can't seem to npm install marked --save
in such a way that will get devcard build to compile.