• Robert Knight's avatar
    Replace babel-plugin-angularjs-annotate with babel-plugin-inject-args · cacdd635
    Robert Knight authored
    It is confusing to have a Babel plugin with an Angular-related name and
    Angular-sounding annotations (`@ngInject`) in the code, even though
    we're not using AngularJS. Although we're not using AngularJS any more,
    we still have services that are instantiated by a dependency injection
    container.  The container reads dependency names from a `$inject`
    property on service functions/classes. This `$inject` property is added
    by `babel-plugin-angularjs-annotate`.
    
    This commit replaces the `angularjs-annotate` Babel plugin with one
    maintained by us [1]. The new plugin provides only the functionality that we
    need (eg. only processes explicitly annotated functions) and uses a more generic
    `@inject` annotation.
    
    [1] https://github.com/hypothesis/babel-plugin-inject-args
    cacdd635
injector-test.js 5.72 KB