Reputation: 884
I used for the js file but it didn't work. I used same scenario for the minimize css file. It works properly. How can I overcome that problem?
gulp.task('buildApp',['copyAll'],function(){ //concatenate js files to buildApp
return gulp.src(paths.js)
.pipe(depsOrder())
.pipe(concat('app.js'))
.pipe(uglify())
.pipe(rename('app.min.js'))
.pipe(gulp.dest(paths.buildAppconcat))
});
Upvotes: 0
Views: 3217
Reputation: 585
It's seems that you want to save two files app.js and app.min.js. For this scenario you could do the following:
gulp.task('buildApp',['copyAll'],function(){ //concatenate js files to buildApp
return gulp.src(paths.js)
.pipe(depsOrder())
.pipe(concat('app.js'))
.pipe(gulp.dest(paths.buildAppconcat))
.pipe(rename('app.min.js'))
.pipe(uglify())
.pipe(gulp.dest(paths.buildAppconcat))
});
Upvotes: 2