Meteorite smart package for entire library?

meteor, meteorite, three.js

Solution

Well neither Meteorite nor the smart package API would directly support this AFAIK.

Here's three options:

If this is for other users to use, you could have a page somewhere that assembles a package for the users (Check out what Boost does on their website).

Just don't use a smart package. Put all the JavaScript files in your public directory and use jquery to download them individually.

You could split up the three.js project into many smart packages, put a dummy package in the `packages` directory and use the `api.use(...)` function to include each component you need.

Just keep in mind, three.js is already on atmosphere, and if the following thought crossed your mind, you should avoid putting hundreds of tiny inter-related subpackages on atmosphere.

And technically `add_files` is to add files to put in a bundle before running a server or deploying, it doesn't directly send files to the client.

Problem

I'm interested in making a smart package for the excellent three.js 3D library. It basically consists of hundreds of different JavaScript files - only several of which might be used for a simple application. AFAIK, a smart package pushes it's JavaScript files to the client using the `add_files` method within the `Package.on_use` callback. If I was to bundle this entire library in a smart package is there any way for the client to specify what components it needs for any given project, or would I basically have to setup a separate smart package for every possible permutation of required components?

Original source