Skip to content

Commit 0d00c52

Browse files
committed
add comment to the end of lib/index files
1 parent 8d902aa commit 0d00c52

9 files changed

+81
-27
lines changed

lib/index-basic.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var core = require('./core');
3+
var Plotly = require('./core');
44

5-
core.register([
5+
Plotly.register([
66
// traces
77
require('./bar'),
88
require('./pie'),
@@ -17,4 +17,10 @@ core.register([
1717
require('./calendars')
1818
]);
1919

20-
module.exports = (function(Plotly) { return Plotly; })(core);
20+
// Using
21+
// module.exports = Plotly;
22+
// here often make unrecognized characters (from d3 - v3) in the bundles
23+
// For now we use an IIFE https://developer.mozilla.org/en-US/docs/Glossary/IIFE
24+
// to return the Plotly object.
25+
// It’s a hack to fix encoding problems and we’ll remove it after we solve those.
26+
module.exports = (function(_Plotly) { return _Plotly; })(Plotly);

lib/index-cartesian.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var core = require('./core');
3+
var Plotly = require('./core');
44

5-
core.register([
5+
Plotly.register([
66
// traces
77
require('./bar'),
88
require('./box'),
@@ -26,4 +26,10 @@ core.register([
2626
require('./calendars')
2727
]);
2828

29-
module.exports = (function(Plotly) { return Plotly; })(core);
29+
// Using
30+
// module.exports = Plotly;
31+
// here often make unrecognized characters (from d3 - v3) in the bundles
32+
// For now we use an IIFE https://developer.mozilla.org/en-US/docs/Glossary/IIFE
33+
// to return the Plotly object.
34+
// It’s a hack to fix encoding problems and we’ll remove it after we solve those.
35+
module.exports = (function(_Plotly) { return _Plotly; })(Plotly);

lib/index-finance.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var core = require('./core');
3+
var Plotly = require('./core');
44

5-
core.register([
5+
Plotly.register([
66
// traces
77
require('./bar'),
88
require('./histogram'),
@@ -24,4 +24,10 @@ core.register([
2424
require('./calendars')
2525
]);
2626

27-
module.exports = (function(Plotly) { return Plotly; })(core);
27+
// Using
28+
// module.exports = Plotly;
29+
// here often make unrecognized characters (from d3 - v3) in the bundles
30+
// For now we use an IIFE https://developer.mozilla.org/en-US/docs/Glossary/IIFE
31+
// to return the Plotly object.
32+
// It’s a hack to fix encoding problems and we’ll remove it after we solve those.
33+
module.exports = (function(_Plotly) { return _Plotly; })(Plotly);

lib/index-geo.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var core = require('./core');
3+
var Plotly = require('./core');
44

5-
core.register([
5+
Plotly.register([
66
// traces
77
require('./scattergeo'),
88
require('./choropleth'),
@@ -17,4 +17,10 @@ core.register([
1717
require('./calendars')
1818
]);
1919

20-
module.exports = (function(Plotly) { return Plotly; })(core);
20+
// Using
21+
// module.exports = Plotly;
22+
// here often make unrecognized characters (from d3 - v3) in the bundles
23+
// For now we use an IIFE https://developer.mozilla.org/en-US/docs/Glossary/IIFE
24+
// to return the Plotly object.
25+
// It’s a hack to fix encoding problems and we’ll remove it after we solve those.
26+
module.exports = (function(_Plotly) { return _Plotly; })(Plotly);

lib/index-gl2d.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var core = require('./core');
3+
var Plotly = require('./core');
44

5-
core.register([
5+
Plotly.register([
66
// traces
77
require('./scattergl'),
88
require('./splom'),
@@ -20,4 +20,10 @@ core.register([
2020
require('./calendars')
2121
]);
2222

23-
module.exports = (function(Plotly) { return Plotly; })(core);
23+
// Using
24+
// module.exports = Plotly;
25+
// here often make unrecognized characters (from d3 - v3) in the bundles
26+
// For now we use an IIFE https://developer.mozilla.org/en-US/docs/Glossary/IIFE
27+
// to return the Plotly object.
28+
// It’s a hack to fix encoding problems and we’ll remove it after we solve those.
29+
module.exports = (function(_Plotly) { return _Plotly; })(Plotly);

lib/index-gl3d.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var core = require('./core');
3+
var Plotly = require('./core');
44

5-
core.register([
5+
Plotly.register([
66
// traces
77
require('./scatter3d'),
88
require('./surface'),
@@ -22,4 +22,10 @@ core.register([
2222
require('./calendars')
2323
]);
2424

25-
module.exports = (function(Plotly) { return Plotly; })(core);
25+
// Using
26+
// module.exports = Plotly;
27+
// here often make unrecognized characters (from d3 - v3) in the bundles
28+
// For now we use an IIFE https://developer.mozilla.org/en-US/docs/Glossary/IIFE
29+
// to return the Plotly object.
30+
// It’s a hack to fix encoding problems and we’ll remove it after we solve those.
31+
module.exports = (function(_Plotly) { return _Plotly; })(Plotly);

lib/index-mapbox.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var core = require('./core');
3+
var Plotly = require('./core');
44

5-
core.register([
5+
Plotly.register([
66
// traces
77
require('./scattermapbox'),
88
require('./choroplethmapbox'),
@@ -18,4 +18,10 @@ core.register([
1818
require('./calendars')
1919
]);
2020

21-
module.exports = (function(Plotly) { return Plotly; })(core);
21+
// Using
22+
// module.exports = Plotly;
23+
// here often make unrecognized characters (from d3 - v3) in the bundles
24+
// For now we use an IIFE https://developer.mozilla.org/en-US/docs/Glossary/IIFE
25+
// to return the Plotly object.
26+
// It’s a hack to fix encoding problems and we’ll remove it after we solve those.
27+
module.exports = (function(_Plotly) { return _Plotly; })(Plotly);

lib/index-strict.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var core = require('./core');
3+
var Plotly = require('./core');
44

5-
core.register([
5+
Plotly.register([
66
// traces
77
require('./bar'),
88
require('./box'),
@@ -51,4 +51,10 @@ core.register([
5151
require('./calendars')
5252
]);
5353

54-
module.exports = (function(Plotly) { return Plotly; })(core);
54+
// Using
55+
// module.exports = Plotly;
56+
// here often make unrecognized characters (from d3 - v3) in the bundles
57+
// For now we use an IIFE https://developer.mozilla.org/en-US/docs/Glossary/IIFE
58+
// to return the Plotly object.
59+
// It’s a hack to fix encoding problems and we’ll remove it after we solve those.
60+
module.exports = (function(_Plotly) { return _Plotly; })(Plotly);

lib/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var core = require('./core');
3+
var Plotly = require('./core');
44

5-
core.register([
5+
Plotly.register([
66
// traces
77
require('./bar'),
88
require('./box'),
@@ -60,4 +60,10 @@ core.register([
6060
require('./calendars')
6161
]);
6262

63-
module.exports = (function(Plotly) { return Plotly; })(core);
63+
// Using
64+
// module.exports = Plotly;
65+
// here often make unrecognized characters (from d3 - v3) in the bundles
66+
// For now we use an IIFE https://developer.mozilla.org/en-US/docs/Glossary/IIFE
67+
// to return the Plotly object.
68+
// It’s a hack to fix encoding problems and we’ll remove it after we solve those.
69+
module.exports = (function(_Plotly) { return _Plotly; })(Plotly);

0 commit comments

Comments
 (0)