How can I use the path from gulp.src() in gulp.dest()?
in your src set the base option and it will maintain the original path of your less file. gulp.task(‘compileLess’, function () { gulp.src(‘./*/less/*.less’, {base: ‘./’}) .pipe(less()) .pipe(gulp.dest( ‘./dist’ )); }); The ./dist destination can be anything. Wherever you want your file structure to be placed. Additional info here: https://github.com/wearefractal/glob-stream#options