andrey-skl / ng-annotate-loader

Webpack loader to annotate angular applications
MIT License
120 stars 28 forks source link

Add an option to use a fork of ng-annotate #40

Closed bluetech closed 7 years ago

bluetech commented 7 years ago

ng-annotate is no longer maintained[1], and hence fails when applied to source code containing modern JavaScript constructs, like import and export. In particular, this prevents usage with Webpack's ES6 modules support (issue #17).

[1] https://github.com/olov/ng-annotate/issues/245

To work around it, allow the user to specify a fork of ng-annotate, which adds support for new JS syntax.

bluetech commented 7 years ago

I created such a fork here: https://github.com/bluetech/ng-annotate-patched and published it to npm under the name ng-annotate-patched. See the README for the changes I had made.

bluetech commented 7 years ago

Regarding the unrelated travis failure, I think the problem is caused by typescript, which for some reason emits its code with \r\n new lines instead of the expected \n.

andrey-skl commented 7 years ago

@bluetech Yeah I have researched it recently and it uses different new line symbols on Mac and Linux, so it is known issue and build doesn't pass at the moment.

bluetech commented 7 years ago

Thank you!

Would you mind publishing a release with this commit? I know you had already made one just the other day - sorry about that. Then I would post instructions in the issue on how to use my fork, if people want to do so; it works fairly well on my codebase with Webpack2 and ES6 modules.

andrey-skl commented 7 years ago

@bluetech published as 0.6.0 – you're welcome.