Skip to content
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

Sorting seems to break given different orderings on globs passed to gulp.src #30

Open
forty8bits opened this issue May 23, 2015 · 0 comments

Comments

@forty8bits
Copy link

Following on from my post in #12, it seems that gulp-angular-filesort is breaking given different orderings of the glob patterns passed into gulp.src before piping into gulp-angular-filesort, which seems like a bug. Basically, changing from this:

gulp.src([
  'app/**/*.js',
  '!app/bower_components/**/*.js',
  '.tmp/templates.js'
]).pipe($.angularFilesort())

To this:

gulp.src([
  '.tmp/templates.js',
  'app/**/*.js',
  '!app/bower_components/**/*.js'
]).pipe($.angularFilesort())

Gives a working script order for injection. .tmp/templates.js is the file output from gulp-angular-templatecache, set to use the main app module (rather than create its own) and use an immediately invoked function expression wrapper (as is used in all of the other files). The contents of this file are completely as expected; no different from any of my own source files in structure. For some reason, when added to the end of the glob patterns, gulp-angular-filesort outputs the main module followed immediately by the templates file right at the top, whereas when inserted as the first entry in the glob patterns, the output is as expected, with the main module and it's dependencies at the end of the injected files.

This may be an issue in ng-dependencies rather than gulp-angular-filesort; I'm happy to provide more help and info given some direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant