marklagendijk / ui-router.stateHelper

A helper module for AngularUI Router, which allows you to define your states as an object tree.
MIT License
235 stars 40 forks source link

Use inline array dependency annotation #8

Closed mdreizin closed 10 years ago

mdreizin commented 10 years ago

It would be nice to have inline array dependency annotation to prevent minification issue and also keep sync with "statehelper.min.js" (because it uses that approach).

marklagendijk commented 10 years ago

Minification is done via a GulpJS task. This task uses a plugin which injects the array notation to make it 'minification-proof'. So this change is not necessary.

Thanks anyway!

mdreizin commented 10 years ago

@marklagendijk I am using dev. version of stateHelper to development purpose and it is minified by uglifyjs also via gulp (I have a lot of un-minified libraries). From my point of view it is good idea to use array annotation, but using of any external plugins which modifies existing source is bad practices.

marklagendijk commented 10 years ago

@mdreizin we appear to disagree. I would say that manually writing the array syntax is error prone, and therefore should be avoided. With ng-annotate (successor of ngMin) you can properly solve this issue. Did you know that uglify also modifies your source code? :P