Welcome! Please see the About page for a little more info on how this works.

0 votes
in tools.deps by

A while ago I was banging my head against http://webjars.org/ and the deployment strategies in use there, in particular I mentioned that the build takes a very long time.

(link: ~alexmiller) suggested that the builds could be happening locally on your machine. This is good for 2 reasons:

  1. Faster
  2. No licensing issues with reuploading (webjars will sometimes have broken dep trees because of this)

The problem being solved is that often you want a versioned asset like jQuery or Bulma.io (css framework), but you don't want to just dump the whole asset into your repo because that would make it harder to update.

I don't think we should isolate ourselves to just the built files though, as it's still useful to bring in something like bulma to use it's sass files as part of a compilation pipeline. But sometimes you just want the default build and that's okay too.

WebJars seems to support multiple versions of the same asset on the classpath at once, there are two mechanisms related to this:

  1. The path is something like webjars/jquery/1.2.0/foo.js
  2. A WebJarLocator which can find these on the classpath without knowing the version (I believe it looks for a manifest file at a known location).

I'm only thinking of server-side use (because that's my primary use-case), but recently I have been using clojurescript with npm dependencies, and I feel that it would be very useful to specify dependencies for clojurescript in the same way.

npm is a good target for support in tools.deps:

  1. It's built with an api from the ground up. Yarn (an alternative npm client from Facebook) has been very popular building on top of the api
  2. Almost everything in the front-end world gets uploaded there. There are older repos like http://bower.io/ which are sometimes in a more convenient format, but npm has seen the highest adoption

1 Answer

0 votes
Reference: https://clojure.atlassian.net/browse/TDEPS-129 (reported by severeoverfl0w)