O
O
OccamaRazor2016-12-12 10:08:21
gulp.js
OccamaRazor, 2016-12-12 10:08:21

How to specify the path to all subfolders and files?

I want to return the contents from these folders and move them. At the same time, an empty "wow.css" appears in the path.css folder, nothing appears in path.js In gulpfile indicated:

gulp.task('function',function(){
  gulp.src('done/**.*')
  .pipe(gulpIf('**/*.css', gulp.dest(path.css), gulpIf('**/*.js', gulp.dest(path.js))))
});

Structure
├── done                             
│    ├── css             
│    │       ├── wow.css
│    │        │            └── main.css   
│    │        └── bootstrap         
│    │                    └── main.css   
│    └── js       
│           ├── jquery
│         │      └── jquery.min.js
│           └── bootstrap     
│                      └── main.js

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kn1ght_t, 2016-12-12
@kn1ght_t

I did something like this, if I just needed to transfer

gulp.task('move',function(){
  return gulp.src([
      '**/*.*'
  ],  {base: './dev/css'}) 
  .pipe(gulp.dest('./build/css/'));
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question