ngbp/ng-boilerplate — pull request #213 by joshdmiller (2014-01-05 09:05:35+00:00)
Title: feat(cli): Command-line interface enhanced a lot

The CLI logic has been migrated from ngbp-cli to here in order to decrease the need to constantly update ngbp-cli with the changes of ngbp proper. ngbp-cli is now a thin wrapper for calling the CLI methods of ngbp proper.

As such, most of this commit adds CLI functionality from ngbp-cli, enhances it, adds error checking, and implements new help features.

In order to accommodate the CLI logic, there are several significant changes to ngbp. A new "log" module was added to do consistent logging, but the existing codebase has *not* been adapted to use it yet. To make CLI options available globally, a new "options" module was created. To check for a local ngbp installation more easily, the "index" of the module was moved from "index.js" to "lib/ngbp.js" and all ngbp modules were moved from "lib" to "lib/ngbp".

Lastly, to accommodate being launched either from Grunt or from the new ngbp-cli, ngbp now calls Grunt internals directly, but will only bootstrap itself automatically if launched from Grunt. This way, ngbp can work through the ngbp-cli, programmatically through any library that calls it, or through Grunt simply by any of the ngbp grunt tasks loading the ngbp module.