gulpfile.js
function(dest, src) {
  return gulp.src(src)
    .pipe(sourcemaps.init())
    .pipe(concat(dest))
    .pipe(gulp.dest(path.join('dist', 'js')))
    .pipe(uglify())
    .pipe(rename({suffix: '.min'}))
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest(path.join('dist', 'js')));
}
function(dest, src) {
  return gulp.src(src)
    .pipe(sourcemaps.init())
    .pipe(concat(dest))
    .pipe(gulp.dest(path.join('dist', 'js')))
    .pipe(uglify())
    .pipe(rename({suffix: '.min'}))
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest(path.join('dist', 'js')));
}
function ( dest , src ) { return gulp . src ( src ) . pipe ( sourcemaps . init ( ) ) . pipe ( concat ( dest ) ) . pipe ( gulp . dest ( path . join ( 'dist' , 'js' ) ) ) . pipe ( uglify ( ) ) . pipe ( rename ( { suffix : '.min' } ) ) . pipe ( sourcemaps . write ( '.' ) ) . pipe ( gulp . dest ( path . join ( 'dist' , 'js' ) ) ) ; }
/* ====================================================================
=            Compile and minify js generating source maps            =
====================================================================
/ * ==================================================================== = Compile and minify js generating source maps = ====================================================================