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).
6
6
7
-
Work in progress. **Do not use this for anything serious.** My code is a mess, and this does not
8
-
cover the full set of cases supported by ng-annotate. Stick with [ng-annotate](https://github.com/olov/ng-annotate)
7
+
Work in progress. **Do not use this for anything serious.** Stick with [ng-annotate](https://github.com/olov/ng-annotate)
9
8
or [babel-ng-annotate](https://github.com/mchmielarski/babel-plugin-ng-annotate) for now.
10
9
11
10
## Goals & Tasks
12
11
13
-
This project/experiment does _not_ seek to replace ng-annotate. However, it does seek to provide the same
14
-
function for Angular 1.x developers who are already using Babel and/or ES6 in their toolchain.
12
+
This project/experiment does _not_ seek to replace ng-annotate. However, it does seek to provide similar
13
+
functionality for Angular 1.x developers who are already using Babel and/or coding in ES6.
15
14
16
-
Because of some of the limitations presented by Babel's transformation process, this project does not seek to
17
-
achieve feature, or provide 1:1 equivalent output with ng-annotate. Most notably, whitespace will not be
18
-
preserved.
15
+
Because of some of the limitations presented by Babel's transformation process, this project does not aim to
16
+
achieve feature parity, or provide identical output to ng-annotate. Notably, Babel does not preserve formatting
17
+
and indentations like ng-annotate does.
19
18
20
19
Initially, I had hoped to make very few modifications to the upstream sources, in the hopes of eventually
21
20
merging babel support directly into ng-annotate. Unfortunately, Babylon appears to have diverged too
22
-
far from Esprima to make that goal realistic. (I would love to be proven wrong here!)
21
+
far from Acorn to make that goal realistic. (I would love to be wrong here, and would welcome contributions that close the gap between the two projects!)
23
22
24
23
That being said, this is my short-term todo list:
25
24
26
-
✓ Support the majority of invocations/annotations currently performed by ng-annotate
27
-
✓ Split up ng-annotate's test suite to be more granular and tolerant of some of babel's other transforms.
28
-
✓ Actually pass those tests.
25
+
*✓ Support the majority of invocations/annotations currently performed by ng-annotate
26
+
*✓ Split up ng-annotate's test suite to be more granular and tolerant of some of babel's other transforms.
27
+
*✓ Actually pass those tests.
29
28
* Pass tests in conjunction with the ES2015 preset.
30
29
* Cleanup. Remove vestigial functionality from the upstream project.
31
30
* Support a (very) limited set of ES6-friendly annotation patterns.
@@ -47,19 +46,19 @@ To test this mess of an experiment, create a .babelrc file for your sources
47
46
And try it out:
48
47
49
48
```
50
-
babel original.js
49
+
babel myCode.js
51
50
```
52
51
53
52
### To run tests:
54
53
55
54
```
56
-
node tests/tests.js
55
+
npm test
57
56
```
58
57
59
58
60
59
## License
61
60
`MIT`, see [LICENSE](LICENSE) file.
62
61
63
-
This project is a fork of ng-annotate, which was written by [Olov Lassus](https://github.com/olov) with the kind help by
62
+
This project is a fork of [ng-annotate](https://github.com/olov/ng-annotate), which was written by [Olov Lassus](https://github.com/olov) with the kind help by
0 commit comments