oblador / angular-parallax

Lightweight & performant parallax scrolling for angular.js.
http://oblador.github.io/angular-parallax/
MIT License
203 stars 44 forks source link

Dist file(angular-parallax.js) should contain full dependencies syntax #4

Closed timfjord closed 10 years ago

timfjord commented 10 years ago

Instead of

angular.module('duParallax.directive', ['duScroll']).
directive('duParallax',
  function(scrollPosition){
  //.....

should be

angular.module('duParallax.directive', ['duScroll']).
directive('duParallax',
  ['scrollPosition', function(scrollPosition) {
    //.....
  }]
oblador commented 10 years ago

If you look at the minified version that's included (and that's the one you're supposed to use in production). However there's no need to have it if it's not minified and in my opinion bloats the code. Makes it a tiny bit more difficult to maintain and read.

oblador commented 10 years ago

Closing in lack of response.

timfjord commented 10 years ago

Sorry for late response, was a little bit busy. So let me add my 5 cents here.

I am RoR developer and in development environment i use non-minified version, because i want control my application and, for example, use js debugger, etc. if needed. Then Rails automatically handle minify process on deployment. That's why i had problem with your dist file, because due to uglify settings after deployment i got js with issues in dependencies syntax. So it would be really great if dev version contains "full dependencies syntax" or at least we can have another one(anyway, all this version generated by grunt).

Regarding to code readability, to my mind, we should use src folder, because this is the source for dist version.

oblador commented 10 years ago

Allright I see your need, but that's something that should be fixed in your build step IMHO.

Have you tried ngmin-rails? Can you swap to use the .min-version instead on deployment?