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

Group packages #614

Open
CedricGuillemet opened this issue Oct 20, 2023 · 3 comments
Open

Group packages #614

CedricGuillemet opened this issue Oct 20, 2023 · 3 comments
Assignees
Milestone

Comments

@CedricGuillemet
Copy link
Contributor

new packages list:

  • BabylonReactNative-Base
  • BabylonReactNative-Windows (?)
  • BabylonReactNative-Camera
  • BabylonReactNative-XR

Shall we do the separation between ios/Android and Windows?

@CedricGuillemet
Copy link
Contributor Author

Current state of investigations.
It's possible with a GitHbu action to upload artifacts to a release.
When doing a new Tag/Release, this action is kicked : https://github.com/BabylonJS/BabylonReactNative/blob/master/.github/workflows/publish.yml
It builds, generate artifacts per platform/RN version. Each artifact is then published to npm (to make it quick)

A prototype to also add these artifact to the github release is visible here : https://github.com/CedricGuillemet/BabylonReactNative-1/blob/master/.github/workflows/append_release.yml

Result is a release with each platform/RN version artifact available to download.

image

At installation time, the front end NPM will download the tgz corresponding to its version.
The same way as node-sass does ( https://github.com/sass/node-sass/blob/master/scripts/install.js ) or puppeteer (https://github.com/puppeteer/puppeteer/blob/main/packages/browsers/src/install.ts#L103 )

2 things to note:
Because of constraint environments, these packages allows to have different sources that can be overriden by an env var:
https://github.com/sass/node-sass/blob/87f38998da059d13a87a7fc9f3d29d5728128e2c/lib/extensions.js#L247
Cache is handled by the installation code like this:
https://github.com/sass/node-sass/blob/87f38998da059d13a87a7fc9f3d29d5728128e2c/scripts/install.js#L68

These 2 mecanisms can be added to the BRN front end plugin.

@CedricGuillemet
Copy link
Contributor Author

PR : #615

@CedricGuillemet
Copy link
Contributor Author

I did a sucessful test using NPM package download instead of GitHub Assets that might be easier to deploy in some environments. What ever is the tech behind this front-end package, it must supports these features:

  • npm install react-native@latest must trigger an update (works with postinstall)
  • Supports mirroring of npmjs (suitable for npm packages, not for Github assets)

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

No branches or pull requests

3 participants