avhimkov
7/13/2016 - 6:05 PM

From https://blog.mariusschulz.com/2016/07/12/speeding-up-babel-transpilation-with-compact-mode

const gulp = require("gulp");
const babel = require("gulp-babel");
const uglify = require("gulp-uglify");

gulp.task("scripts", function() {
    return gulp.src("./src/app/**/*.js")
        .pipe(babel({ compact: true, presets: ["es2015"] }))
        .pipe(uglify())
        .pipe(gulp.dest("./dist/app"));
});