James Baker
James Baker

Reputation: 1

What is the purpose of meteor/packages?

meteor/packages seems completely redundant considering there is packages.json. What does meteor/packages do then? Why should I not delete it?

Upvotes: 0

Views: 73

Answers (1)

Christian Fritz
Christian Fritz

Reputation: 21364

It's unclear in your question whether you are asking about the file .meteor/packages or the packages/ sub-directory in your project folder. So here an explanation of both:

.meteor/packages stores the list of meteor (atmosphere) packages you have added to your project using meteor add; the corresponding versions are stored in .meteor/versions. This file is needed, e.g., for collaboration: by adding this file to version control you tell others which packages need to be installed, i.e., avoid the need for them to also run meteor add, etc.

packages/ stores local packages. This is only needed if you have or want local packages, e.g., when you have developed packages yourself that you did not publish on atmosphere, or packages you are actively working on. Now that meteor uses ES6 and supports ES6 modules, there is less of a need for local packages, but in the past it was very useful to be able to encapsulate certain behaviors into a package (which you'd now do into a class). Of course, if you want to use the same component in multiple meteor apps, packages (local or not) are still the way to go.

Hope this helps.

Upvotes: 3

Related Questions