This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-04
Channels
- # admin-announcements (6)
- # alda (1)
- # announcements (3)
- # aws (4)
- # beginners (233)
- # boot (82)
- # cider (11)
- # cljsjs (21)
- # cljsrn (7)
- # clojure (262)
- # clojure-japan (1)
- # clojure-russia (129)
- # clojure-sg (2)
- # clojure-taiwan (2)
- # clojurecup (23)
- # clojurescript (162)
- # clojurex (3)
- # core-async (18)
- # cursive (81)
- # datavis (183)
- # datomic (23)
- # emacs (2)
- # funcool (25)
- # ldnclj (82)
- # lein-figwheel (3)
- # om (196)
- # onyx (74)
- # parinfer (7)
- # portland-or (12)
- # re-frame (60)
- # reagent (48)
- # slack-help (1)
- # yada (9)
The library I'm adding to CLJSJS, MathBox, is actually MathBox 1 -- the author has quite recently released MathBox 2, which is radically different and not at all backward compatible. They're effectively two distinct libraries. Also, MathBox 2 is still alpha, according to the author (as of 9/27). For CLJSJS purposes, any suggestions on the best way to handle that? I may very well only be adding MathBox 1, but someone else may want to later. Is it better to explicitly label mine mathbox1, with mathbox2 as an eventual separate package? Alternately, I could just call this one mathbox, with an eventual mathbox2. Or treat them as the same package, and trust version numbering to avoid confusion? (although honestly, I think there'd still be plenty of confusion if I did that). Any feedback appreciated. @martinklepsch ?
@domkm: As far as I know, Closure-compatible libs have no need to be on CLJSJS, they can just be added straight to your project. But I haven't done that myself, and I'm no expert; this is just a placeholder answer until someone more knowledgeable comes along đ
@eggsyntax: I want a Maven package so I don't have to vendor the JS code.
Should be easy, I believe. See the "Including external JavaScript within your compilationâ section of http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html But again, if you hit any trouble youâll want info from someone more knowledgeable.
@eggsyntax: Hmm, does that help with avoiding including the JS files in my project directly?
Yeah, you should be able to just include :libs ["libs/foobar.jsâ]
in your compiler options (in project.clj). Of course, the JS code (or at least the subset youâre using) will get added to the build, but you shouldnât have to download & include it explicitly other than that.
But I should seriously shut up at this point â again, Iâm just giving my vague understanding without ever having actually done it.
Looks like you could also include it right from https://github.com/nberger/libphonenumber-cljs :
[nberger/libphonenumber-cljs "7.1.0-SNAPSHOTâ]
@eggsyntax: @domkm closure compatible stuff can be packaged via :libs (similar to :foreign-libs). See the openlayers Package for an Exempel
Example
Thanks @martinklepsch . Any thoughts about my question above (@ 2:28)?
@eggsyntax: I'd suggest using regular versions
My worry is that if someone then adds MathBox2, no one will ever run across mine â which is fine by me, but theyâre different enough that some folks may prefer the first version, which is simpler. Theyâre quite different.
@eggsyntax: old releases will always remain available via clojars
@eggsyntax: if there is a real need we can do it as we did with jquery
Howâs that? I just see the one jquery (along with a couple of specific things like jquery-daterange-picker).
@eggsyntax: check its readme/build.boot
@martinklepsch: Ah, gotcha, the v1/v2 stuff. OK, cool, that answers my worries. Thanks!
Thanks @martinklepsch