scijs / packages

A list of all SciJS packages. Based on @hughsk's stack.gl/packages
http://scijs.net/packages/
25 stars 1 forks source link

how do I install all scijs packages at one go? #6

Open pratikac opened 8 years ago

pratikac commented 8 years ago

Is it possible to create a package config that installs all the ndarray-* packages?

rreusser commented 8 years ago

There's not currently a way to do this. (Well, there actually is precisely this floating around somewhere, but I'd have to track down the author and at any rate it's no less than a couple years out of date.) Part of the rationale is that when bundled for distribution, installing independently greatly reduces the bundle size. The truth though is that I think tree shaking is going to become a big thing in the near future so that with some planning, it will be much more reasonable to install one big package and only bundle what you need.

Even with tree shaking though, another downside of the one-go strategy is that it's a lot more maintenance to keep a single package updated and versioned. It wouldn't be unreasonable to create a script that pulls the whole index, but I'm not sure if it's worth the trouble. The challenges you're running into, if I may guess, are probably 1) knowing what to use and what's available and 2) a bunch of requires everywhere.

To solve the first issue, http://scijs.net/packages has a searchable index that hopefully makes it a bit easier to locate what you need. I'm starting to work on some major cleanup of the ndarray stuff, so if you have thoughts, needs, feedback, or interests, don't hesitate to speak up.

The second is tough because of the maintenance thing.

rreusser commented 8 years ago

Although technically the packages wiki page is THE official list of what's available, so it wouldn't be that hard to just make a script that plows through it and installs everything. It doesn't remove the burden of knowing what's there and requiring though, so not sure about the value.

pratikac commented 8 years ago

Thanks. I see the rationale of not having a large library with everything in it, e.g., maintenance, modularity etc. I think the current setup in ndarray is very nice, http://scijs.net/packages is quite complete as a documentation and the only painful thing is a bunch of requires at the top of the file (which is quite okay, really).

I am (very) new to JS :) For now, the functionality of ndarray seems amazingly good (off the top of my head, maybe save tensors to json?). With respect to organization, I felt that scijs can be split into a few large-ish libraries, e.g., (ndarray, pool, concat etc.), (fft, convolve), roughly, the titles of each section on http://scijs.net/packages. I feel scijs will likely be used to run a not-so-small computation in the browser, so the package size need not be absolutely minimal.