Fork me on GitHub

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 ?


Is CLJSJS used to package Closure-compatible JS or only JS that requires deps/externs?


@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 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 : [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


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!