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

Won't concat files in certain order #68

Closed
nathanhornby opened this issue Oct 17, 2014 · 2 comments
Closed

Won't concat files in certain order #68

nathanhornby opened this issue Oct 17, 2014 · 2 comments

Comments

@nathanhornby
Copy link

(On latest version)

I'm seeing an odd issue where files declared in one order will be concatenated successfully, but not in a different order. Annoyingly the order that works in this case is the wrong order for my needs.

This works:

gulp.task('plugins', function() {
    return gulp.src(['js/compiled/scripts.min.js','plugins/*.js'])
        .pipe(concat('all.min.js'))
        .pipe(gulp.dest('dist'));
});

This doesn't:

gulp.task('plugins', function() {
    return gulp.src(['plugins/*.js','js/compiled/scripts.min.js'])
        .pipe(concat('all.min.js'))
        .pipe(gulp.dest('dist'));
});

No errors.

scripts.min.js lints just fine, but does have a long sourcemap added to the end of it after linting.

Edit: Updating to add that removing the sourcemap doesn't have any effect.

Editing to clarify: 'Doesn't work', by this I actually mean that the second example will result in all.min.js only containing the single file currently in plugins/. i.e. it doesn't combine the files from those two locations. In the first example, it successfully concat's the files as you'd expect.

@yocontra
Copy link
Member

Hmm that's weird. This is more of an issue on gulp.src, can you open something on vinyl-fs? I don't think there are any tests regarding file ordering.

@yairEO
Copy link

yairEO commented Nov 25, 2014

This a huge bug in the newest gulp version! very annoying. I I wrote an issue here -
gulpjs/gulp#687

Hope they answer quickly! Any order with wildcard returns random stream (using gulp src)

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

3 participants