Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1009 Bytes

DEVELOPMENT.md

File metadata and controls

28 lines (21 loc) · 1009 Bytes

Developing a Gadget client

When developing a Gadget client, or the core, it is helpful to be able to have another project reference your local version. Because we need the in-development version to run in CI, we use gitpkg for vendoring in-development versions of these packages within Gadget proper.

gitpkg

gitpkg is a way to publish an NPM-compatible tarball to a git repository. First, run

# if able to write to `gadget-inc/js-clients` repo
pnpm --filter=@gadgetinc/api-client-core prerelease

# to an arbitrary repo
pnpm --filter=@gadgetinc/api-client-core gitpkg publish --registry git@mygit.server:org/private-registry.git

Once you've released a package, you can add a resolution in your other project's package.json:

{
  "dependencies": {
    "@gadgetinc/react": "0.1.2"
  },
  "resolutions": {
    "@gadgetinc/react": "https://codeload.github.com/gadget-inc/js-clients/tar.gz/@gadgetinc/react-v0.1.2-gitpkg-0123456"
  }
}