You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Experimental fork of [ng-annotate](https://github.com/olov/ng-annotate).
5
+
Experimental fork of [ng-annotate](https://github.com/olov/ng-annotate). Adds Angular 1.x DI annotations to ES5/ES6 code being processed by babel, with support for explicit annotations (`/* @ngInject */`) and implicit annotations of idiomatic Angular code.
6
6
7
-
Work in progress. **Do not use this for anything serious.** Stick with [ng-annotate](https://github.com/olov/ng-annotate)
8
-
or [babel-ng-annotate](https://github.com/mchmielarski/babel-plugin-ng-annotate) for now.
7
+
Work in progress. **Test thoroughly before using this in production.** If stability is a priority, consider [ng-annotate](https://github.com/olov/ng-annotate)
8
+
or [babel-ng-annotate](https://github.com/mchmielarski/babel-plugin-ng-annotate), which are both excellent alternatives to this plugin.
9
+
10
+
This plugin currently supports matching and transforming all of the patterns currently recognized by ng-annotate (explicit and implicit), and passes the relevant portions of ng-annotate's test suite. ES6 support will be expanded in future releases -- contributions are welcome!
11
+
12
+
See [ng-annotate](https://github.com/olov/ng-annotate)'s documentation for more details.
13
+
14
+
## Usage
15
+
16
+
Use like any other [Babel plugin](https://babeljs.io/docs/plugins/).
@@ -14,7 +37,7 @@ functionality for Angular 1.x developers who are already using Babel and/or codi
14
37
15
38
Because of some of the limitations presented by Babel's transformation process, this project does not aim to
16
39
achieve feature parity, or provide identical output to ng-annotate. Notably, Babel does not preserve formatting
17
-
and indentations like ng-annotate does.
40
+
and indentations like ng-annotate does, and this project does not seek to replicate the features of ng-annotate that remove or transform existing annotations.
18
41
19
42
Initially, I had hoped to make very few modifications to the upstream sources, in the hopes of eventually
20
43
merging babel support directly into ng-annotate. Unfortunately, Babylon appears to have diverged too
@@ -25,29 +48,10 @@ That being said, this is my short-term todo list:
25
48
* ✓ Support the majority of invocations/annotations currently performed by ng-annotate
26
49
* ✓ Split up ng-annotate's test suite to be more granular and tolerant of some of babel's other transforms.
27
50
* ✓ Actually pass those tests.
28
-
* Pass tests in conjunction with the ES2015 preset.
29
-
* Cleanup. Remove vestigial functionality from the upstream project.
51
+
*✓ Pass tests in conjunction with the ES2015 preset._(almost)_
52
+
*✓ Cleanup. Remove vestigial functionality from the upstream project.
30
53
* Support a (very) limited set of ES6-friendly annotation patterns.
31
-
* Publish to npm, make a release, etc.
32
-
33
-
34
-
## Don't Say I Didn't Warn You
35
-
36
-
To test this mess of an experiment, create a .babelrc file for your sources
0 commit comments