From 9b9ed5f3e812a66bdfbee6679642f29f51f94dd0 Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Tue, 20 Mar 2018 09:37:55 +0100 Subject: [PATCH] fix: remove useless manual sourcemaps prefixing in gulp "deploy:dist" task Sourcemaps output names are resolved at writting once source files are already renamed with the `.min` prefix. --- gulp/tasks/deploy.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gulp/tasks/deploy.js b/gulp/tasks/deploy.js index 2e00755ca..afa1c8057 100644 --- a/gulp/tasks/deploy.js +++ b/gulp/tasks/deploy.js @@ -70,15 +70,13 @@ gulp.task('deploy:dist', ['sass:foundation', 'javascript:foundation'], function( // * Create minified files // * Create minified-sourcemaps based on standard sourcemaps. // Sourcemaps are initialized before the ".min" renaming to be able retrieve - // original sourcemaps (based on the source name), then renamed manually. + // original sourcemaps from source names. .pipe(cssFilter) .pipe(gulp.dest('./dist/css')) .pipe(sourcemaps.init({ loadMaps: true })) .pipe(rename({ suffix: '.min' })) .pipe(cleancss({ compatibility: 'ie9' })) - .pipe(sourcemaps.write('.', { - mapFile: function(path) { return path.replace('.css.map', '.min.css.map'); } - })) + .pipe(sourcemaps.write('.')) .pipe(gulp.dest('./dist/css')) .pipe(cssFilter.restore) @@ -87,9 +85,7 @@ gulp.task('deploy:dist', ['sass:foundation', 'javascript:foundation'], function( .pipe(sourcemaps.init({ loadMaps: true })) .pipe(rename({ suffix: '.min' })) .pipe(uglify()) - .pipe(sourcemaps.write('.', { - mapFile: function(path) { return path.replace('.js.map', '.min.js.map'); } - })) + .pipe(sourcemaps.write('.')) .pipe(gulp.dest('./dist/js')); }); -- 2.47.2