Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a standalone build of GUI and configure TS support #25

Merged

Conversation

georgyangelov
Copy link
Contributor

  • Added TS support so that and configuration interfaces we write can have exported types.
  • Removed react, react-dom, redux and react-redux from the regular bundle (scratch-gui.js) as they weren't used by scratch-www anyway
  • Added a separate output bundle called scratch-gui-standalone which includes all of the dependencies above and exposes a function to instantiate the editor with its own React instance. This allows scratch-web and scratch-gui to not conflict on React versions - one can use 16, the other can use 18 with no issues.

I haven't tested the build with scratch-www @MiroslavDionisiev what's the simplest way to do that? Want to make sure the externals were not actually used from scratch-www.


I will make some changes to abstract away project loading soon, but that would probably be a separate PR

@georgyangelov
Copy link
Contributor Author

The build fails as this PR depends on changes from scratchfoundation/scratch-webpack-configuration#54 which are not in NPM yet

packages/scratch-gui/tsconfig.json Outdated Show resolved Hide resolved
packages/scratch-gui/webpack.config.js Outdated Show resolved Hide resolved
@georgyangelov
Copy link
Contributor Author

I realized I hadn't configured eslint to check TS files and corrected that.

@cwillisf does everything in scratch-webpack-configuration and here looks ok to you? Do we push the buttons? 😄

Copy link
Contributor

@cwillisf cwillisf left a comment

Choose a reason for hiding this comment

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

Looks good! Merge (both) when ready :)

@georgyangelov georgyangelov merged commit 7c3c594 into scratchfoundation:develop Sep 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants