Is it possible to specify a single path for concat gulp?

Actually, the question in the title.

There is a folder with a large attachment, like this:

gulp.task('js', function(){
 return gulp.src(['/application/assets/js/jquery-1.11.21.min.js',
'/application/assets/js/ripples.min.js',
'/application/assets/js/lib/toastr/toastr.min.js',
'/application/assets/js/bootstrap.min.js',
'/application/assets/js/textChange.js',
'/application/assets/js/material.js',
'/application/assets/js/lib/fancybox/jquery.fancybox.pack.js',
'/application/assets/js/lib/boxLoader/js/jquery.boxloader.min.js'])
.pipe(concat('script.js'))
.pipe(gulp.dest('application/assets/build/js/'));
});


Is it possible to register a shared path /application/assets/js/ and then just print the appropriate names?

Presumably, the task should look like this:

return gulp.src( '/application/assets/js/' + ['jquery-1.11.21.min.js', 'ripples.min.js', ...] )


Really to do so? or you need to register for each re-file the entire way?
March 23rd 20 at 19:00
1 answer
March 23rd 20 at 19:02
Solution
return gulp.src(['jquery-1.11.21.min.js', 'ripples.min.js', ...].map(
 file => `/application/assets/js/${file}`
)
)

Find more questions by tags Gulp.js