diff --git a/gulp/tasks/cleanMaps.js b/gulp/tasks/cleanMaps.js new file mode 100644 index 0000000..7a84a67 --- /dev/null +++ b/gulp/tasks/cleanMaps.js @@ -0,0 +1,14 @@ +'use strict'; + +var config = require('../config'); +var gulp = require('gulp'); +var del = require('del'); +var path = require('path'); + +gulp.task('cleanmaps', function(cb) { + + // It seems to be impossible to disable sourcemaps normally. Instead, delete + // them at the end of 'prod'. + return del([path.join(config.scripts.dest, 'main.js.map')]); + +}); diff --git a/gulp/tasks/production.js b/gulp/tasks/production.js index ec01eee..986a4b6 100644 --- a/gulp/tasks/production.js +++ b/gulp/tasks/production.js @@ -9,6 +9,8 @@ gulp.task('prod', ['clean'], function(cb) { global.isProd = true; - runSequence(['styles', 'fonts', 'views'], 'browserify', 'gzip', cb); + runSequence( + ['styles', 'fonts', 'views'], + 'browserify', 'cleanmaps', cb); });