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

feat: build react and native components as separate packages #89

Merged
merged 3 commits into from
Sep 30, 2021

Conversation

sternetj
Copy link
Contributor

  • Adds build logic/scripts to build and deploy the React and ReactNative components as separate node modules

Commands

  • yarn build - invokes the react and native build commands
  • build:react - invokes a build of just the react component files (generated by the generate:react-components cmd)
  • postbuild:react
    • Creates the build/react folder
    • Moves the dist folder (created by tsdx) into the build/react folder
    • Moves the src/build/react folder (created by generate:react-components) into the build/react/src folder\
  • postbuild - calls the prepare-packages.js script which copies and transforms the required package metadata files (LICENSE, README.md, and package.json)

The native commands operate similarly to the react commands

@sternetj
Copy link
Contributor Author

From a build perspective it generates the files in the right structure and should be backwards compatible with the original structure. Not exactly sure how to test the release without running it though.
image

ynotdraw
ynotdraw previously approved these changes Sep 30, 2021
Copy link
Contributor

@ynotdraw ynotdraw left a comment

Choose a reason for hiding this comment

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

This is awesome! Thanks 🙌

Due to the import change for react-native, how would you feel about making this a breaking change with conventional commits (https://www.conventionalcommits.org/en/v1.0.0/) so we get a major version bump instead? I don't imagine anyone was using the latest version yet, but just in case to follow semantic versioning.

Do you know how the Releases section will work after this, since it's now two packages? Not a deal breaker by any means, just curious (https://github.com/lifeomic/chromicons/releases)

@@ -33,13 +33,13 @@ import { Apple } from '@lifeomic/chromicons';
1. Install Dependencies

```bash
yarn add @lifeomic/chromicons react-native-svg
yarn add @lifeomic/chromicons-native
Copy link
Contributor

Choose a reason for hiding this comment

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

🙌

@lifeomic-probot
Copy link

lifeomic-probot bot commented Sep 30, 2021

⚠️ Detected a breaking change in commit 21573a2

Merging this PR will result in a major version bump.

Created by lifeomic-probot (Enforce Semantic Commits)

BREAKING CHANGE: previous versions shipped with both react and react-native components but now they are published individually
@sternetj
Copy link
Contributor Author

@ynotdraw I realized I was applying the pkgRoot setting in the wrong place and ended up moving it to the release.config.js file. As far as the release log goes, I am not sure exactly what will happen but i would guess that both packages will always be released as the same version and the release log will stay synced up and it will just list all commits since the last release.

@sternetj sternetj requested a review from ynotdraw September 30, 2021 15:08
Copy link
Contributor

@ynotdraw ynotdraw left a comment

Choose a reason for hiding this comment

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

Awesome! No worries about the release section either, was just curious!

@sternetj
Copy link
Contributor Author

Here we go 🤞

@sternetj sternetj merged commit 1fc3dd9 into master Sep 30, 2021
@sternetj sternetj deleted the multi-package-build branch September 30, 2021 16:22
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.

2 participants