eugeneware/debowerify — pull request #5 by 00Davo (2013-06-28 00:04:59+00:00)
Title: When there is no main field, assume module's entry point is called moduleName.js

It turns out there are lots of Bower components that don't specify their `main` file! In addition, there are plenty of Bower components that don't actually have a `bower.json` or `component.json` at all, and the one Bower automatically generates also lacks a `main` field.

Previously debowerify couldn't cope with those particular components at all. I noted, however, that many components simply have a main file named after the module itself; having debowerify "guess" that the module's entry point is at `moduleName.js`, when not told otherwise by a `main` field, will allow for many more components to be debowerified without manual `bower.json` modification.

If a module's entry point *isn't* at `moduleName.js`, an error is now produced along the lines of "module not found: ../components/moduleName/moduleName.js", which I think is as clear as the error that used to be produced for this case (a simple "module not found: moduleName"), with the added advantage of hinting (somewhat) toward the fact that the missing `main` field is the source of the error.