frontend-tasks
Version:
Frontend Tasks is a wrapper around gulp for most of the normal use cases for simple and modern frontend development
23 lines (17 loc) • 459 B
JavaScript
import gulp from 'gulp';
import flatten from 'gulp-flatten';
import merge from 'merge-stream';
const copyTask = (src, dest) => {
return gulp.src(src).pipe(flatten()).pipe(gulp.dest(dest));
};
const copy = (options) => {
return () => {
const streams = [];
options.paths.forEach((path) => {
streams.push(copyTask(path.src, path.dest));
});
return merge(streams);
};
};
copy.description = `copies files from src to dest`;
export default copy;