nodecg/nodecg — pull request #22 by Langeh (2014-09-06 06:15:35+00:00)
Title: Modular refactor

Right, this is a big one.

The entire core has been re-written and broken out into a bunch of modular parts in the "lib" folder. Everything in "lib" is a re-factor, no new functionality was added there. Just housekeeping.

"Packages" have been changed to "bundles". The word "packages" is already used by npm, figured we should differentiate.

[Squirrel](https://github.com/DamonOehlman/squirrel) has been added, allowing bundles to safely declare whatever npm deps they may need, and they will be installed quietly at runtime if needs be. This is a big deal.

Server.js has also been modified to search for "index.js" in the root of each bundle. If found, it mounts as express middleware, effectively making it a plugin that can do things like declare its own routes.