mgol / grunt-ng-annotate

Add, remove and rebuild angularjs dependency injection annotations
MIT License
222 stars 29 forks source link

Possibility to map declarative functions #31

Closed LeonanCarvalho closed 9 years ago

LeonanCarvalho commented 9 years ago

Hello,

That's a nice tool if you isn't using grunt since beginning of project, like me!

But I have a big problem, I'm using https://github.com/laurelnaiad/angular-couch-potato to lazy load my stuffs. But, the guys from couch pota, was changed default names, I think the reason for it was conflicts of names.

Take a look whats couch potato do with declarative functions:

        svc.registerValue = registerValue;
        svc.registerConstant = registerConstant;
        svc.registerFactory = registerFactory;
        svc.registerService = registerService;
        svc.registerFilter = registerFilter;
        svc.registerDirective = registerDirective;
        svc.registerController = registerController;
        svc.registerDecorator = registerDecorator;
        svc.registerProvider = registerProvider;

Almost every function has a clone, I tryed rename but its made a lot of function conflicts.

And for this reason I'm not able to use grunt ng-annotate.

There is a way to mapping this functions?

something like:

options: {
 mapping: {
  'directive': 'registerDirective'
  'controller ': 'registerController'
  ...
}

It would be great!

Thanks

mgol commented 9 years ago

This Grunt plugin just wraps ng-annotate, the whole annotating logic is there. Please report any issues specific to what's annotated there.