This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-21
Channels
- # arachne (1)
- # aws-lambda (50)
- # beginners (10)
- # boot (59)
- # capetown (4)
- # cider (9)
- # cljsjs (27)
- # clojure (249)
- # clojure-berlin (8)
- # clojure-finland (7)
- # clojure-germany (1)
- # clojure-italy (6)
- # clojure-nl (7)
- # clojure-russia (91)
- # clojure-spec (100)
- # clojure-uk (61)
- # clojureremote (2)
- # clojurescript (171)
- # core-async (11)
- # cursive (31)
- # data-science (1)
- # datascript (2)
- # datomic (11)
- # dirac (2)
- # emacs (16)
- # events (1)
- # hoplon (142)
- # juxt (4)
- # lein-figwheel (9)
- # leiningen (10)
- # luminus (7)
- # lumo (44)
- # mount (3)
- # off-topic (150)
- # om (18)
- # onyx (5)
- # perun (12)
- # planck (12)
- # protorepl (13)
- # re-frame (28)
- # reagent (8)
- # ring (1)
- # ring-swagger (10)
- # spacemacs (2)
- # specter (11)
- # sql (14)
- # untangled (99)
- # vim (18)
- # yada (2)
Hi everyone, I’m evaluating clojurescript + reagent for a new project I’m working on and I’ve been struggling for the past couple of days trying to integrate a javascript library (http://js.cytoscape.org/)
I have a pretty much “default” project created with lein new reagent my-app +devcards
.
Is there any good documentation out there on how to import a javascript library into your project? (Btw i’m just concerned about making it work on dev, no need for externs or any prod setup)
By the way: I don’t mind importing through a <script>
Maybe this is usefull, I mjust looked at it and maybe try to get it working in the near future
Ok so I just got it working: it was relatively simple. In the handlers.clj
I added the following line under loading page:
(include-js “/js/cytoscape-2.7.15.js”)
And I copied the library to my public/js
folderForget to put the actual link in, https://www.reddit.com/r/Clojure/comments/4r7kzz/how_to_use_this_react_colorpicker_component_in_my/ seems like the same idea
Nice, thanks @gklijs
@dsapoetra does it work from your browser's devtools?