Merge branch 'main' into fix/solve-snapshots-tests-failing-node-18

This commit is contained in:
Simone Taeggi 2023-01-13 18:51:35 +01:00
commit 731ec0de89
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,25 @@
# Linking the Strapi Design System
Follow these steps to use a local version of the Strapi design system with the Strapi monorepo
First, run `yarn build` in `strapi-design-system/packages/strapi-design-system` to generate the bundle.
In your copy of Strapi, you can link the design system using either a [relative path](#relative-path) or [yarn link](#yarn-link).
### Relative path
Replace the version number in both `strapi/packages/core/admin/package.json` and `strapi/packages/core/helper-plugin/package.json` with the relative path to your copy of the design system:
```
"@strapi/design-system": "link:../../../../strapi-design-system/packages/strapi-design-system"
```
### Yarn link
Alternatively, you can use [`yarn link`](https://classic.yarnpkg.com/lang/en/docs/cli/link/) by first running `yarn link` in `strapi-design-system/packages/design-system` and then `yarn link @strapi/design-system` in both `strapi/packages/core/admin` and `strapi/packages/core/helper-plugin`. With this approach, no changes need to be made to the `package.json`
Once the link is setup, run the following command from the root of the monorepo
```
yarn lerna clean && yarn setup
```

View File

@ -50,6 +50,17 @@ const sidebars = {
},
],
},
{
type: 'category',
label: 'Admin',
items: [
{
type: 'doc',
label: 'Link Strapi Design System',
id: 'core/admin/link-strapi-design-system',
},
],
},
{
type: 'category',
label: 'Content Type Builder',