ceymard/gulp-ngcompile — pull request #2 by tikiatua (2014-07-22 09:24:15+00:00)
Title: adapt regex-pattern to match modules without dependencies

First off: I really love your ng-compile plugin. Saves us a ton of repetitive work.

However, it is currently not possible to use it, if module definitions are split over multiple files and therefore created with the statement `angular.module('test').controller('someController', function(){})`

It would be great, if the plugin could find all modules used for the application, create a new module definition with all dependencies at the top of the concatenated file and include all subsequent module calls without creating a new module.

Example:
```javascript
// declare test module with dependencies
angular.module('test', ['anotherModule']);

// add controllers without creating a new module
angular.module('test').controller('someController', function(){});
angular.module('test').controller('someOtherController', function(){});

// add our main application with dependencies
angular.module('app', ['test']);
```

Currently we are declaring our module initializers in a separate file by hand and append it to the stream compiled with ngcompile().