Skip to main content

Localize Dependencies

What It Does

The command localize-deps allows you to use a local Gesso repo instead of @acromedia/gesso. This is helpful when you need to test local Gesso changes and can't use the packaged version.

This command can be used with anything - lib, design-system, frontend, etc.

Getting Started

  1. With a local copy of Gesso pulled down, run pnpm build from the root. Localize dependencies will only work when the entire collection of libraries is built.

  2. Use the local Gesso create scripts to create the package(s) that you need. Be sure to use the --useLocal true flag.

    /path/to/cloned/gesso/starter-kits/create-gesso/bin/create-gesso.js --useLocal true
  3. Once created, setup your .npmrc and .env like normal. In the .env, add a new GESSO_REPO variable with the path to your local Gesso repo.

    GESSO_REPO=/path/to/cloned/gesso
  4. If you don't already have the Gesso CLI installed, install it with pnpm install @acromedia/gesso-cli

  5. Use the localize-deps command to update your project to use the local copy of Gesso.

    pnpm gesso localize-deps

Making Changes

When making changes to your local Gesso, be sure to rebuild and re-localize.

  1. Make changes to your local Gesso. Then run pnpm build from the Gesso root to rebuild the libraries.
  2. Go to your project and run pnpm gesso localize-deps.

The command copies the Gesso libraries to your project. It's a bit crude, but it maintains the dependencies.