How to keep separate versions of local Atmosphere packages?

I am following the package-based app structure approach, which allows me to share my private local packages across apps using the METEOR_PACKAGE_DIRS environment variable. This works very well and helps a lot to avoid duplicate code.

However, I now have several Meteor apps which are on different Meteor versions, most of them are 1.2, some of them are 1.5. Since 1.3 came out, things have changed a lot in the build system. Not only do we have imports and a new syntax for package.js, but there are also a lot of package dependencies that had to be updated to be compatible with 1.3+.

If I was publishing my packages to Atmosphere, this wouldn’t be a problem, since I could maintain separate package versions there. But many of my packages just don’t make any sense to the community, since they are tightly coupled with my apps. So my question is, if there’s any way to locally maintain different versions of packages of the same package at the same time? Or, even better, if there’s a way to host a private Atmosphere server.

1 Like

You can manage the packages within your app itself by creating a copy.

Yep, but that’s what I wanted to avoid. I would prefer being able to put them on a repository and download the correct version as required. Just like on Atmosphere.

I haven’t tried it yet but Git Submodules seems like a pretty good alternative, and you’ve got all the infrastructure for it already. Running your own Atmosphere server really seems a bit excessive for this task hehe.