![Tim Buckley](/assets/img/avatar_default.png)
This disables sourcemap generation for production builds to save on disk space. While useful, source maps are several times larger than our actual used code, so it's best to only keep them around during development. This also turns off gzip, since it is just duplicating files for now; we'll want to reconsider this feature once StackViz is building inside the gate if links start breaking. Change-Id: Ie4c2735c08014f417b8f1f68fc8f6b9e4898dff2
15 lines
358 B
JavaScript
15 lines
358 B
JavaScript
'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')]);
|
|
|
|
});
|