Hacker News new | ask | show | jobs
by theflubba 4261 days ago
Meh. NgAnnotate is way better than duplicating code. Be DRY, not pedantic.
3 comments

Something we are looking to change. The duplication is pretty annoying, but we use AssetGraph-Builder for our production build, which uses ngmin, which doesn't play nice with ui-router. Also, now that 1.3 errors globally when you forget annotations, using NgAnnotate is much more of a no-brainer.
I have heard that it has trouble working in a complex build/development environment, e.g. when watching live file changes* with gulp/browserify.

*) https://www.npmjs.org/package/gulp-watchify/

Hmm. There are no open bugs for that on the gulp-ng-annotate or browserify-ngannotate repos. https://github.com/Kagami/gulp-ng-annotate/issues and https://github.com/omsmith/browserify-ngannotate/issues

Feel free to open issues and I'm sure it will be addressed.

ng-annotate itself just produces output for input (stdin/stdout or via files) so it does not at all have any trouble participating in a "complex build environment".

I switched from ngmin to ngAnnotate+uglify. Man this is way faster! Also code looks much better!
Internet high-five!