Gulp task publishing only one project

339 views Asked by At

When trying to publish projects from a solution using the below gulp task it working fine.

 var publish = function (projectPath) {
return gulp.src([projectPath + "/**/*.csproj"])
    .pipe(foreach(function (stream, file) {
        return publishStream(stream, file);
    }));

But when I pass an array with my project name in to gulp.src like below, publishing only one project and the task is exited. (here 'projects' is my array of projects)

return gulp.src(projects)
    .pipe(foreach(function (stream, file) {
        return publishStream(stream, file);
    }));

What may be the reason

1

There are 1 answers

0
Sandeepkumar Gupta On

You have to provide the root folder as second parameter as shown below.

gulp.src(['bower_components/jquery/jquery.js',
            'bower_components/superscrollorama/js/greensock/TweenMax.min.js',
            'bower_components/superscrollorama/jquery.superscrollorama.js' ],
        {base: 'bower_components/'})
    .pipe(...);

Please have a look at Why does gulp.src not like being passed an array of complete paths to files?.