3 ms·
The NPM world is putting a lot of weight behind monorepos and have tooling like lerna and yarn workspaces (also now in NPM 7) to make working with multiple pack
by qbasic_forever 6y ago
The NPM world is putting a lot of weight behind monorepos and have tooling like lerna and yarn workspaces (also now in NPM 7) to make working with multiple packages in one or many repos easy. They're learning the lessons that folks like Google did with monorepos being much easier to manage and change sets of related projects (i.e. atomic commits that update everything at once).
As far as why break every component up into different packages, that's a nice easy optimization for end-users. If you only want to use one of these components you just link to it in your page and you're done. No need to setup a complex bundler with tree-shaking etc. to remove all the other components you aren't using. Remember with JS & HTML every import is paying a cost in time and space for your endusers so it's critical to prune unused or unnecessary code.
IMHO you need to spend a few months getting into frontend development. These kind of repos and organizations will make a lot more sense when you see and deal with the problems firsthand. You look pretty silly calling it 'crap' and no one who reads this is going to take you seriously...