Anand
Anand

Reputation: 191

Gulp task for multiple js libraries along with appropiate names

Can anyone pls tell how to write gulp task for files in different folders. ? I mean

www
   js
      a.js
   lib
      jq.js

Output:

www 
   js
     a.min.js
   lib
     jq.min.js

I am unable to write in single task. I am using rename,obfuscate and ngAnnotate plugin.

Upvotes: 0

Views: 48

Answers (1)

Aditya Singh
Aditya Singh

Reputation: 16720

Use the array syntax for gulp.src as:

gulp.task('task-name', function () {
  return gulp.src(['www/js/**/*.js', 'www/lib/**/*.js'])
    .pipe(<Add your task>)
    .pipe(gulp.dest('www'));
})

Upvotes: 1

Related Questions