I have a gulp task that concats and uglifies the js files when changed. If I only use one source, it works. I am learning angular however, and want it to concat the modules first so similar to this:
https://medium.com/@dickeyxxx/best-practices-for-building-angular-js-apps-266c1a4a6917#.mujtfmj63
I am using:
gulp.task('scripts', function(){
return gulp.src(path.gulp.paths.src + ['/**/module.js', '/**/*.js'])
.pipe(concat('all.min.js'))
.pipe(uglify())
.pipe(gulp.dest(path.gulp.paths.dist));
});
and the gulp task runs but it does not create the all.min.js file. If I remove the array and just use this it works:
gulp.task('scripts', function(){
return gulp.src(path.gulp.paths.src + '/**/*.js')
.pipe(concat('all.min.js'))
.pipe(uglify())
.pipe(gulp.dest(path.gulp.paths.dist));
});
My directory is set up as
public
|
+-- modules
| |
| +-- module.js
+-- test.js
What am I doing wrong?