From ddfe660f0a5ac8f4606b14fcd1b0d6ccd02da7ab Mon Sep 17 00:00:00 2001 From: David Craig Date: Tue, 19 Apr 2016 17:18:07 +1200 Subject: [PATCH] Fix variable references when debugging --- gulpfile.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index b388729ff..338b8020e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -70,6 +70,10 @@ const babelifyOptions = { comments: false, }; +const uglifyOptions = { + mangle: false, +}; + // Used for autoprefixing css properties (same as Bootstrap Aplha.2 defaults) const supportedBrowsers = [ 'Chrome >= 35', @@ -327,7 +331,7 @@ gulp.task('bundle-lib', function bundleLib() { .pipe(order([`**/${bundleFileName}`, '**/chosen.js'])) .pipe(sourcemaps.init({ loadMaps: true })) .pipe(concat(bundleFileName, { newLine: '\r\n;\r\n' })) - .pipe(uglify()) + .pipe(uglify(uglifyOptions)) .pipe(sourcemaps.write('./')) .pipe(gulp.dest(PATHS.ADMIN_JS_DIST)); }); @@ -353,7 +357,7 @@ gulp.task('bundle-legacy', function bundleLeftAndMain() { .pipe(source(bundleFileName)) .pipe(buffer()) .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(uglify()) + .pipe(uglify(uglifyOptions)) .pipe(sourcemaps.write('./')) .pipe(gulp.dest(PATHS.ADMIN_JS_DIST)); }); @@ -393,7 +397,7 @@ gulp.task('bundle-framework', function bundleBoot() { .pipe(source(bundleFileName)) .pipe(buffer()) .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(uglify()) + .pipe(uglify(uglifyOptions)) .pipe(sourcemaps.write('./')) .pipe(gulp.dest(PATHS.ADMIN_JS_DIST)); });