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

Generate a programmatically-consumable, typesafe API for an external bundle #124

Closed
afoxman opened this issue Apr 12, 2021 · 1 comment
Closed
Assignees
Labels
feature: external bundle This is related to External Bundles

Comments

@afoxman
Copy link
Contributor

afoxman commented Apr 12, 2021

An external bundle exports a collection of packages, each under a unique name. The external bundle author specifies this mapping as kit configuration.

For example, it might look like this:

"rnx-kit": {
    "externalBundle": {
        "interface": {
            "MyKitGlobal.Telemetry": "telemetryjs",
            "MyKitGlobal.StringResources": "string-resources",
            "MyKitGlobal.ReactNative.Components": "react-native"
        }
    }
}

The kit bundler will take this configuration, and use it to generate a programmatically-consumable, typesafe API. Something along the lines of a typescript .d.ts file.

Other packages which depend on this kit will naturally gain access to the typesafe API, and benefit from it in IDEs like VSCode and at lint/build time.

@tido64 tido64 added the feature: external bundle This is related to External Bundles label Jul 8, 2021
@afoxman afoxman self-assigned this Mar 20, 2022
@afoxman
Copy link
Contributor Author

afoxman commented Mar 20, 2022

Merged into #1283

@afoxman afoxman closed this as completed Mar 20, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature: external bundle This is related to External Bundles
Projects
None yet
Development

No branches or pull requests

2 participants