IMHO, this is not something that is related to the work of the task manager (aka gulp, grunt or even webpack, here it does not matter). The community goes to a place where you own a lot of (relatively) tiny node modules that do one thing and do it well, so it's pretty related to your first suggestion.
VCS repository might look like this:
my-repo/ package-1/ package.json package-2/ package.json package-3/ package.json ...
... then you work with npm link to create symbolic links inside the modules themselves, so you do not need to publish modules to receive updates.
There is a rather new lerna package that does exactly this npm link thing automatically (it determines your dependency graph in your "local" modules and establishes a connection between them), all you have to do is follow their structure. In addition, he knows how to publish publications, you can run commands in all packages and bind other related things.
Babel , React are excellent examples of these modules - separation of interests. Babel is working with lerna to automate bundling between packages, these are their reasons to have a monorepo .
Roy Miloh
source share