Skip to content

Commit 7de7be9

Browse files
committed
remove keepIndex option and keep index in lib for sourcemap
1 parent 5aa2234 commit 7de7be9

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

tasks/partial_bundle.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ if(process.argv.length > 2) {
4343
var traces = inputArray(args.traces, allTraces);
4444
var transforms = inputArray(args.transforms, allTransforms);
4545
var calendars = inputBoolean(args.calendars, true);
46-
var keepindex = inputBoolean(args.keepindex, false);
4746

4847
var i, t;
4948

@@ -88,10 +87,6 @@ if(process.argv.length > 2) {
8887
distMin: path.join(constants.pathToDist, 'plotly-' + out + '.min.js')
8988
};
9089

91-
if(!keepindex) {
92-
opts.deleteIndex = true;
93-
}
94-
9590
console.log(opts);
9691

9792
opts.sourcemap = true;
@@ -115,7 +110,6 @@ function partialBundle(tasks, opts) {
115110
var transformList = opts.transformList;
116111
var calendars = opts.calendars;
117112
var sourcemap = opts.sourcemap;
118-
var deleteIndex = opts.deleteIndex;
119113

120114
tasks.push(function(done) {
121115
var partialIndex = mainIndex;
@@ -150,7 +144,6 @@ function partialBundle(tasks, opts) {
150144
tasks.push(function(done) {
151145
var bundleOpts = {
152146
debug: sourcemap,
153-
deleteIndex: deleteIndex,
154147
standalone: 'Plotly',
155148
pathToMinBundle: distMin
156149
};

tasks/util/browserify_wrapper.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,7 @@ module.exports = function _bundle(pathToIndex, pathToBundle, opts, cb) {
5151
var pending = (pathToMinBundle && pathToBundle) ? 2 : 1;
5252

5353
function done() {
54-
if(cb && --pending === 0) {
55-
if(opts.deleteIndex) {
56-
console.log('delete', pathToIndex);
57-
fs.unlinkSync(pathToIndex, {});
58-
}
59-
60-
cb(null);
61-
}
54+
if(cb && --pending === 0) cb(null);
6255
}
6356

6457
var bundleStream = b.bundle(function(err) {

0 commit comments

Comments
 (0)