Use this when you have the cfpb/design-system repo cloned next to this repo and want Storybook/tests to use your branch (e.g. layout fixes) before a release.
Assume sibling directories:
projects/
design-system/ # monorepo root; package lives in packages/cfpb-design-system/
design-system-react/ # this repo
If your paths differ, adjust the portal: URL below.
In design-system-react package.json, temporarily set the devDependency to the portal protocol (live symlink to source):
"@cfpb/cfpb-design-system": "portal:../design-system/packages/cfpb-design-system"Then from design-system-react:
yarn install
yarn storybook
# optional
yarn testportal: keeps the dependency wired to your clone so SCSS/JS changes in design-system show up after save (no publish step).
- Remove the
portal:line and restore the published version (e.g."5.3.2"). - Run
yarn installagain.
src/components/Layout/layout.scss in this repo duplicates some rules that belong in the DS once your PR ships. After you adopt a released @cfpb/cfpb-design-system that includes the layout fix, consider removing the overlapping blocks from layout.scss so overrides stay minimal.
From design-system/packages/cfpb-design-system you can yarn link, then in design-system-react yarn link @cfpb/cfpb-design-system. Portal is usually simpler in a Yarn workspaces/monorepo workflow.