mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 17:29:14 +00:00
Merge branch 'main' into fix/solve-snapshots-tests-failing-node-18
This commit is contained in:
commit
731ec0de89
25
docs/docs/core/admin/link-strapi-design-system.md
Normal file
25
docs/docs/core/admin/link-strapi-design-system.md
Normal 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
|
||||||
|
```
|
@ -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',
|
type: 'category',
|
||||||
label: 'Content Type Builder',
|
label: 'Content Type Builder',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user