This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-02
Channels
- # announcements (1)
- # asami (89)
- # aws (10)
- # babashka (41)
- # beginners (71)
- # calva (25)
- # cider (3)
- # clj-kondo (65)
- # cljdoc (15)
- # cljs-dev (3)
- # cljsrn (8)
- # clojure (56)
- # clojure-europe (44)
- # clojure-italy (1)
- # clojure-nl (2)
- # clojure-uk (48)
- # clojured (7)
- # clojurescript (17)
- # conjure (6)
- # cursive (3)
- # datomic (9)
- # emacs (11)
- # events (3)
- # fulcro (3)
- # helix (3)
- # honeysql (7)
- # hugsql (6)
- # introduce-yourself (2)
- # jobs (2)
- # kaocha (4)
- # luminus (1)
- # nrepl (2)
- # off-topic (10)
- # pathom (7)
- # philosophy (3)
- # polylith (27)
- # reagent (18)
- # reitit (3)
- # remote-jobs (7)
- # reveal (3)
- # shadow-cljs (9)
- # slack-help (5)
- # tools-deps (9)
- # vim (48)
Hello! I used luminus and the 3rd edition of the corresponding book to learn clojure web programming. Great starting point! Got something up and running. Now I'm struggeling with "installing" bulma tagsinput: https://bulma-tagsinput.netlify.app/get-started/ I managed to install and compile sass for the new @bulmacreative bulma-badge and bulma-tooltip. The tagsinput component is different: it needs a js. First of all, I thought I need to include the tagsinput.js in the index.html - but I realized: It will be assembled to the app.js by shadow-cljs through the dependendies. My package.json contains in the dependencies section:
"@creativebulma/bulma-tagsinput": "^1.0.3"
My assumption: the bulma js for tagsinput will be included in app.js.
The bulma docs asks to do:
BulmaTagsInput.attach();
How do I do that with the hiccup I have?
This is my try (I know, .attach should happen somewhere in initialization...)
(defn example-tagsinput []
(let [_ (.attach js/BulmaTagsInput)]
[:div
[:div.field
[:label.label "Tags"]
[:div.control
[:select {:data-type "tags" :data-placeholder "Choose Tags"}
[:option {:value "one" :selected "true"} "One"]
[:option {:value "two"} "Two"]]]]
[:div.field
[:label.label "Tags"]
[:div.control
[:input.input {:type "text" :data-type "tags" :placeholder "Choose Tags" :value "One,Two"}]]]]))
But that does not work... Even more confusing ist:
As soon as I remove the
<script src="/js/bulma-tagsinput.min.js"></script>
from my index.html, the execution of the hiccup fails with:
Uncaught ReferenceError: BulmaTagsInput
My conlusion: the tagsinput.js dependendency is not includet in the app.js...
Is there a description of an idiomatic way how to integrate bulma extensions?
Any hint is wellcome.