Organizing local packages

Can local packages be organized as subdirectories under /packages? Or do all packages have to exist in the /packages folder itself?

In other words, is there any way to have this structure:

/packages/ui/… contains a bunch of packages with UI widgets
/packages/data/… contains a bunch of packages wrapping collections

And so on?

When I create a subdirectory under /packages and then change into it and run the meteor create --package command, it just creates the package at the /packages level instead of in the subdirectory I am currently in. So I am guessing the answer to my question is “all local packages must reside in the /packages directory itself”, but thought I’d ask.

You are unfortunately correct.

But if you want, you can put your local packages in a separate folder in your computer and run meteor like

$ env PACKAGE_DIRS="multiple paths on your computer" meteor

which will force meteor to load packages from those directories.

1 Like