diff --git a/src/playground/editor.jsx b/src/playground/editor.jsx index 6f74f6bdc..2dace8360 100644 --- a/src/playground/editor.jsx +++ b/src/playground/editor.jsx @@ -1,5 +1,4 @@ -// must be first for progress bar to work -import './tw-hacky-progress-bar'; +import './tw-imports'; import ReactDOM from 'react-dom'; import React from 'react'; diff --git a/src/playground/player.jsx b/src/playground/player.jsx index ec72ca7c7..a211b33e0 100644 --- a/src/playground/player.jsx +++ b/src/playground/player.jsx @@ -1,5 +1,4 @@ -// must be first for progress bar to work -import './tw-hacky-progress-bar'; +import './tw-imports'; import ReactDOM from 'react-dom'; import React from 'react'; diff --git a/src/playground/tw-imports.js b/src/playground/tw-imports.js new file mode 100644 index 000000000..609e4dfb8 --- /dev/null +++ b/src/playground/tw-imports.js @@ -0,0 +1,4 @@ +// this should be the first file imported by all entry points +// the order of these imports does matter +import './tw-hacky-progress-bar/index.js'; +import './tw-self-check/index.js'; diff --git a/src/playground/tw-self-check/index.js b/src/playground/tw-self-check/index.js new file mode 100644 index 000000000..d5477977c --- /dev/null +++ b/src/playground/tw-self-check/index.js @@ -0,0 +1,17 @@ +// Check our dependencies to make sure we are using the TurboWarp versions forks. +// This is a development tool -- users should never see these messages. + +/* eslint-disable */ + +import VirtualMachine from 'scratch-vm'; +import RenderWebGL from 'scratch-render'; + +if (!VirtualMachine.isTurboWarp) { + alert('The installed scratch-vm is not the TurboWarp fork.'); + console.error('The installed scratch-vm is not the TurboWarp fork.'); +} + +if (!RenderWebGL.isTurboWarp) { + alert('The installed scratch-render is not the TurboWarp fork.'); + console.error('The installed scratch-render is not the TurboWarp fork.'); +}