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
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.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
Once created, setup your
.npmrc
and.env
like normal. In the.env
, add a newGESSO_REPO
variable with the path to your local Gesso repo.GESSO_REPO=/path/to/cloned/gesso
If you don't already have the Gesso CLI installed, install it with
pnpm install @acromedia/gesso-cli
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.
- Make changes to your local Gesso. Then run
pnpm build
from the Gesso root to rebuild the libraries. - 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.