Skip to content

Commit 34c09c3

Browse files
committed
drop sourcemap option
1 parent 1e21747 commit 34c09c3

File tree

2 files changed

+10
-31
lines changed

2 files changed

+10
-31
lines changed

tasks/partial_bundle.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ if(process.argv.length > 2) {
6262

6363
name: out,
6464
index: path.join(constants.pathToLib, 'index-' + out + '.js'),
65-
sourceMap: path.join(constants.pathToDist, 'plotly-' + out + '.min.js.map'),
6665
distMin: path.join(constants.pathToDist, 'plotly-' + out + '.min.js')
6766
};
6867

@@ -88,7 +87,6 @@ function partialBundle(tasks, opts) {
8887
var traceList = opts.traceList;
8988
var transformList = opts.transformList;
9089
var calendars = opts.calendars;
91-
var sourceMap = opts.sourceMap;
9290

9391
tasks.push(function(done) {
9492
var partialIndex = mainIndex;
@@ -122,7 +120,6 @@ function partialBundle(tasks, opts) {
122120

123121
tasks.push(function(done) {
124122
var bundleOpts = {
125-
pathToSourceMap: sourceMap,
126123
standalone: 'Plotly',
127124
pathToMinBundle: distMin
128125
};

tasks/util/browserify_wrapper.js

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var browserify = require('browserify');
55
var minify = require('minify-stream');
66
var derequire = require('derequire');
77
var through = require('through2');
8-
var exorcist = require('exorcist');
98

109
var strictD3 = require('./strict_d3');
1110

@@ -35,8 +34,7 @@ module.exports = function _bundle(pathToIndex, pathToBundle, opts, cb) {
3534

3635
var browserifyOpts = {};
3736
browserifyOpts.standalone = opts.standalone;
38-
var sourceMap = opts.pathToSourceMap;
39-
browserifyOpts.debug = opts.debug || !!sourceMap;
37+
browserifyOpts.debug = opts.debug;
4038

4139
if(opts.noCompress) {
4240
browserifyOpts.ignoreTransform = './tasks/compress_attributes.js';
@@ -70,33 +68,17 @@ module.exports = function _bundle(pathToIndex, pathToBundle, opts, cb) {
7068
ascii_only: true
7169
},
7270

73-
sourceMap: sourceMap ? {
74-
includeSources: true,
75-
root: '/',
76-
filename: path.basename(pathToMinBundle)
77-
} : false
71+
sourceMap: false
7872
};
7973

80-
if(sourceMap) {
81-
bundleStream
82-
.pipe(applyDerequire())
83-
.pipe(minify(minifyOpts))
84-
.pipe(exorcist(sourceMap))
85-
.pipe(fs.createWriteStream(pathToMinBundle))
86-
.on('finish', function() {
87-
logger(pathToMinBundle);
88-
done();
89-
});
90-
} else {
91-
bundleStream
92-
.pipe(applyDerequire())
93-
.pipe(minify(minifyOpts))
94-
.pipe(fs.createWriteStream(pathToMinBundle))
95-
.on('finish', function() {
96-
logger(pathToMinBundle);
97-
done();
98-
});
99-
}
74+
bundleStream
75+
.pipe(applyDerequire())
76+
.pipe(minify(minifyOpts))
77+
.pipe(fs.createWriteStream(pathToMinBundle))
78+
.on('finish', function() {
79+
logger(pathToMinBundle);
80+
done();
81+
});
10082
}
10183

10284
if(pathToBundle) {

0 commit comments

Comments
 (0)