Answer the question
In order to leave comments, you need to log in
How to migrate directories without certain files using gulp?
There is a structure:
├── root-folder
│ ├── folder-one
│ ├── folder-two
│ ├── some-file.js
│ └── some-file.json
I only need to transfer from the root-folder directory directories with their internals (directories and files), and files (in this case some-file.js and some-file.json) should not be transferred.
How to do this with gulp?
Answer the question
In order to leave comments, you need to log in
gulp.task('replace', function(){
return gulp.src(['path-to-root-folder/**', '!path-to-root-folder/*.+(js|json)'])
.pipe(gulp.dest('path/to/destination/folder'));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question