Skip to content

Conversation

@cwillisf
Copy link
Contributor

Resolves

Test failures when building scratch-gui against builds of scratch-storage after #20 was merged.

Proposed Changes

The distinct entry point used by the web build, index-web.js, has been removed. Instead, the web build uses the same index.js entry point used by the Node build.

One side effect is that the storage module will no longer be available by window.Scratch.Storage when dist/web/scratch-storage.js is included on a web page through a <script> tag or similar. Instead, it will now be available through window.ScratchStorage. This should not affect any of our internal Scratch 3.0 projects.

Reason for Changes

This change should have been included with #20: that change broke the new scratch-gui integration tests. Roughly speaking this is because the index-web.js file was doing a poor imitation of UMD, which conflicts with the proper use of UMD introduced in #20.

Using UMD for the web build conflicts with the old `index-web.js` file,
since they both try to do roughly the same thing. This change should
have been part of the recent switch to UMD output for `dist/web`.
Copy link
Contributor

@thisandagain thisandagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM and seems more reasonable.

@thisandagain thisandagain removed their assignment Oct 3, 2017
Copy link
Contributor

@aeons aeons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this as well :)

@cwillisf cwillisf merged commit 9fce982 into scratchfoundation:develop Oct 3, 2017
@cwillisf cwillisf deleted the fix-web-build branch October 3, 2017 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants