From d388b029031b26e21e4301267ad58c384b4465d6 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Mon, 29 Aug 2016 15:49:35 -0400 Subject: [PATCH] Update babel-preset-es2015 and add debug stripping support to the gulpfile --- gulpfile.js | 3 ++- package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 6409ed3..ecb3ff4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -9,6 +9,7 @@ const gulp = require("gulp"), gModernizr = require("gulp-modernizr"), gBabel = require("gulp-babel"), gPostCSS = require("gulp-postcss"), + gStripDebug = require("gulp-strip-debug"), autoprefixer = require("autoprefixer"); // determine if gulp has been run with --production @@ -80,7 +81,7 @@ function processJavaScript(ouputFilename, inputFiles, es6) { .pipe(gConcat(ouputFilename + ".js")); if (es6) { javascript.pipe(gBabel({ presets: [ "es2015" ] })); } - if (prod) { javascript.pipe(gUglify()); } + if (prod) { javascript.pipe(gStripDebug()).pipe(gUglify()); } return javascript.pipe(gulp.dest("public/js/")); } diff --git a/package.json b/package.json index 29bf2d5..793699a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "autoprefixer": "^6.4.0", - "babel-preset-es2015": "^6.13.2", + "babel-preset-es2015": "^6.14.0", "gulp": "^3.9.1", "gulp-babel": "^6.1.2", "gulp-concat": "^2.6.0", @@ -18,6 +18,7 @@ "gulp-postcss": "^6.1.1", "gulp-sass": "^2.3.2", "gulp-sass-glob": "^1.0.6", + "gulp-strip-debug": "^1.1.0", "gulp-uglify": "^2.0.0", "gulp-util": "^3.0.7" }