-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong sorting with files in deep directory structure #12
Comments
I'm seeing the same behavior. My directory structure looks like this:
After injecting with |
I've been testing some more with dependencies that should be ordered like this: |
After looking at this further, I've had success with My understanding is that getter syntax is a valid approach, however this will not work with |
Hmm, it looks like a bug to me. This is not an intended behavior. |
I'm forming the opinion that the order does not matter for custom scripts. I just read this article and then changed the order around myself with no problem. It may be important to load 'jquery.js' before 'angular.js' before custom scripts, but it appears that the custom script order does not matter with the way Angular dependency injection works. Am I wrong here? Perhaps my issues were from something else. |
I found the problem. I was not reading files before piping them to angularFileSort |
I think files order should be consistent from build to build, otherwise, for example, there is no profit from using |
@aki-russia The initial problem here was using @joakimbeng Can you close #12 ? We already found a solution and you even merged a PR. |
I'm seeing incorrect sort ordering on a project which roughly follows the guidelines at https://github.com/johnpapa/angular-styleguide. Am I right in thinking there are no workarounds currently? Creating a new, unique module using setter syntax for every file couldn't be a realistic solution for most projects following this kind of structure. |
I have a directory structure similar to the following:
app.js
has a module deifinedangular.module('app', [])
itemController.js
adds a controller to app moduleangular.module('app').controller(...)
Sorting result puts
itemController.js
beforeapp.js
.When I tried putting 'itemController.js' one level higher (in admin directory) sorting worked as expected.
The text was updated successfully, but these errors were encountered: