I'm trying to use Gulp to:
- Take 3 specific javascript files, concatenate them, then save the result to a file (concat.js)
- Take this concatenated file and uglify/minify it, then save the result to another file (uglify.js)
I have the following code so far
var gulp = require('gulp'),
gp_concat = require('gulp-concat'),
gp_uglify = require('gulp-uglify');
gulp.task('js-fef', function(){
return gulp.src(['file1.js', 'file2.js', 'file3.js'])
.pipe(gp_concat('concat.js'))
.pipe(gp_uglify())
.pipe(gulp.dest('js'));
});
gulp.task('default', ['js-fef'], function(){});
However, the uglify operation doesn't seem to be working, or the file isn't generated for some reason.
What do I need to do to make this happen?