Skip to content

Commit 3055546

Browse files
authored
Merge pull request #7229 from plotly/drop-amd-header
Drop AMD support from bundle header
2 parents 71bc4ee + 49258f6 commit 3055546

File tree

6 files changed

+3
-68
lines changed

6 files changed

+3
-68
lines changed

.circleci/config.yml

-6
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,6 @@ jobs:
464464
- run:
465465
name: Test plot-schema.json diff - If failed, after (npm start) you could run (npm run schema && git add test/plot-schema.json && git commit -m "update plot-schema diff")
466466
command: diff --unified --color dist/plot-schema.json test/plot-schema.json
467-
- run:
468-
name: Test plotly.min.js import using amdefine
469-
command: npm run test-amdefine
470-
- run:
471-
name: Test plotly.min.js import using requirejs
472-
command: npm run test-requirejs
473467

474468
test-stackgl-bundle:
475469
docker:

draftlogs/7229_remove.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Drop AMD support from bundle header [[#7229](https://github.com/plotly/plotly.js/pull/7229)]

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
"test-export": "node test/image/export_test.js",
4848
"test-syntax": "node tasks/test_syntax.js && npm run find-strings -- --no-output",
4949
"test-bundle": "node tasks/test_bundle.js",
50-
"test-amdefine": "node tasks/test_amdefine.js",
51-
"test-requirejs": "node tasks/test_requirejs.js",
5250
"test-plain-obj": "node tasks/test_plain_obj.mjs",
5351
"test": "npm run test-jasmine -- --nowatch && npm run test-bundle && npm run test-image && npm run test-export && npm run test-syntax && npm run lint",
5452
"b64": "python3 test/image/generate_b64_mocks.py && node devtools/test_dashboard/server.mjs",

tasks/test_amdefine.js

-28
This file was deleted.

tasks/test_requirejs.js

-26
This file was deleted.

tasks/util/bundle_wrapper.mjs

+2-6
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ function addWrapper(path){
5656
[
5757
'(',
5858
' function(root, factory) {',
59-
' if (typeof define === "function" && define.amd) {',
60-
' define(factory);',
61-
' } else if (typeof module === "object" && module.exports) {',
59+
' if (typeof module === "object" && module.exports) {',
6260
' module.exports = factory();',
6361
' } else {',
6462
' root.moduleName = factory();',
@@ -73,9 +71,7 @@ function addWrapper(path){
7371
path,
7472
[
7573
'',
76-
'if (!(typeof define === "function" && define.amd)) {',
77-
' window.Plotly = Plotly;',
78-
'}',
74+
'window.Plotly = Plotly;',
7975
'return Plotly;',
8076
'}));',
8177
].join('\n'),

0 commit comments

Comments
 (0)