Using Gulp to Concatenate and Uglify files
It turns out that I needed to use gulp-rename and also output the concatenated file first before ‘uglification’. Here’s the code: var gulp = require(‘gulp’), gp_concat = require(‘gulp-concat’), gp_rename = require(‘gulp-rename’), 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(gulp.dest(‘dist’)) .pipe(gp_rename(‘uglify.js’)) .pipe(gp_uglify()) .pipe(gulp.dest(‘dist’)); }); gulp.task(‘default’, [‘js-fef’], function(){}); Coming from grunt it was a … Read more