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

refactor: split the package into core and pro #230

Merged
merged 16 commits into from
Jan 30, 2024
Merged

Conversation

tomivirkki
Copy link
Member

@tomivirkki tomivirkki commented Jan 29, 2024

Description

This PR splits the repository into two separate React wrapper packages, one for the core components and another one for the commercial ones.

Fixes #229

Type of change

Refactor

"main": "index.js",
"types": "index.d.ts",
"version": "24.4.0-alpha8",
"private": true,
"scripts": {
Copy link
Contributor

Choose a reason for hiding this comment

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

The build is pretty confusing:

  • Most NPM scripts don't work without setting an env variable
  • Most NPM scripts are generic, but some are package specific, naming is also challenging
  • Scripts in scripts use an env variable to determine which folder to operate in, which is kind of hidden in a utility module

Would it be feasible to duplicate the NPM scripts for the build into the respective packages and then just run the build separately inside each package folder? The modules within script could then just use the current folder as context instead of an env variable. Duplicating the NPM scripts between two packages might be a better trade-off compared to the points above.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, this approach makes more sense than using the environment variables. Done.

web-padawan
web-padawan previously approved these changes Jan 29, 2024
packages/react-components-pro/package.json Outdated Show resolved Hide resolved
packages/react-components-pro/package.json Show resolved Hide resolved
web-padawan
web-padawan previously approved these changes Jan 29, 2024
sissbruecker
sissbruecker previously approved these changes Jan 30, 2024
Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

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

The build failed, looks like something is wrong with prepare script.

@tomivirkki
Copy link
Member Author

Yeah, looks like it tries to build them in parallel because prepare is also run on install, and -pro depends on core so core should be built first...

@tomivirkki
Copy link
Member Author

Reverted the latest change. CI/Bender can just rely on the packages being built (in the correct order) on install. Sorry about the hassle.

@tomivirkki tomivirkki merged commit e3b9a38 into main Jan 30, 2024
1 check passed
@tomivirkki tomivirkki deleted the refactor/workspace branch January 30, 2024 11:09
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.

Prototype splitting packages [2 days]
3 participants