Fork me on GitHub
#cljsjs
<
2016-11-29
>
mikebelanger20:11:50

Suppose there's a project out there that already has externs (just not for clojurescript). Do I still need to include the .ext.js file in an extern for cljsjs, or can I just ask Boot to download that extern straight from the original project's repo?

juhoteperi20:11:17

@mikebelanger You can use Boot to download it

mikebelanger20:11:10

@juhoteperi cool, and btw it gets checksummed, so if that original repo changes, Boot will fail

juhoteperi20:11:02

You should also use URL with the library version

mikebelanger20:11:32

@juhoteperi you mean a url with a version number in it?

juhoteperi20:11:49

(I'm just writing comment on ToneJs PR about this)

mikebelanger20:11:53

Oh yeah, I should change the version thing to actually make sense, not just add nothing 😛

juhoteperi20:11:46

Both r8 and 0.8.0 are okay, r8 should work fine in Clojars & tooling, but ToneJs is using 0.8.0 in npm

mikebelanger20:11:31

@juhoteperi right its best to be consistent with npm -- I totally spaced.

mikebelanger20:11:53

@juhoteperi as far as urls go, I'm a little confused. Does the formatted url get assigned as the :scm map value in the task-options! pom {... part?

juhoteperi20:11:34

No, to the download task url parameter

mikebelanger20:11:00

@juhoteperi but that url doesn't exist -- I mean ideally Tonejs would go with version numbers in the url, but it doesn't look like that's a branch in the repo

mikebelanger20:11:53

@juhoteperi ...oh I see, instead of master its r8...

juhoteperi20:11:05

Yeah, it is a tag instead of branch

mikebelanger20:11:18

@juhoteperi I had no idea github had the r/ urls 😛 I need to learn to git better.

mikebelanger20:11:20

I see what you mean, one var for lib url, one formatted to match up with npm

juhoteperi20:11:53

Usually libraries use the version number as tag, so there is no need for different "release" and "version"

mikebelanger20:11:51

That makes a lot of sense -- I was thinking the checksum was the only check in place against a changed repo, which is a little precarious

juhoteperi20:11:58

Checksum is mostly to guard against CI failing the download for some reason

juhoteperi20:11:22

And I'm not sure if it is worth it nowadays

juhoteperi20:11:08

Previously we didn't have as well refined build process

mikebelanger20:11:24

I could see it being useful in the case of a url that isn't in vc -- but I guess that's pretty rare

mikebelanger21:11:35

Sorry, as you can tell I know nothing about git, I just added a commit based on what you mentioned, do I need to do another PR, or does that commit get included in the PR?

juhoteperi21:11:52

It gets included.

juhoteperi21:11:10

@mikebelanger Now the PR is missing +version+, it is used by pom task

juhoteperi21:11:42

oh and +lib-version+ refers itself, instead of +lib-release+

mikebelanger21:11:47

oops sorry will change that right away

juhoteperi21:11:54

Aaand it would be best to have +version+ still

juhoteperi21:11:08

+version+ includes the cljsjs specific part, e.g. -1

juhoteperi21:11:25

that is increased if the cljsjs package is changed without updating the library version

mikebelanger21:11:35

So something like...

(def +lib-release+ "8")
(def +lib-version+ (str "0." +lib-release+ ".0"))
(def +version+ (str +lib-version+ "-1"))

(set-env!
  :resource-paths #{"resources"}
  :dependencies '[[cljsjs/boot-cljsjs "0.5.2"]])

(task-options!
 pom  {:project     'cljsjs/tonejs
       :version     +version+
       :description "A Web Audio framework for making interactive music in the browser."
       :url         ""
       :license     {"MIT" ""}
       :scm         {:url ""}})
?

juhoteperi21:11:37

@mikebelanger Yes, that seems correct

mikebelanger22:11:00

@juhoteperi sorry to bug you again, but the version in tonejs' README seems to be +version+, instead of the full release -- does it read it from the POM settings? I can make another PR real quick

mikebelanger22:11:41

oh wait, looks like the robot changed it