A
A
Andrey Pronin2016-03-29 10:13:59
gulp.js
Andrey Pronin, 2016-03-29 10:13:59

Gulp How to combine images from subfolders into one?

Source folder 'Markup/blocks/**/*.{png,gif,jpg,jpeg,svg,ico}'
gulp.task(
"frontend:build-images", function (cb) {
del(paths.frontend.images .dest, cb);
gulp.src(paths.frontend.images.src)
.pipe(gulp.dest(paths.frontend.images.dest));
}
);
How to make gulp copy all pictures into one folder?
Now copied taking into account the nesting of folders, for example:
images
--bg1
----fon1
--bg2
----fon2
----fon3

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Pronin, 2016-04-01
@kanekt

var flatten = require('gulp-flatten');
gulp.src('bower_components/**/*.min.js')
.pipe(flatten({ includeParents: 0 }))
.pipe(gulp.dest('build/js'));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question