Skip to content

Commit e0c8191

Browse files
committed
update CONTRIBUTING.md
1 parent 7d1894d commit e0c8191

File tree

1 file changed

+4
-42
lines changed

1 file changed

+4
-42
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@ You can patch `@api-platform/admin` by two different ways:
3030
- by linking `@api-platform/admin` sources to an existing project;
3131
- by installing this project and running it through Storybook.
3232

33-
> Prerequiste: running Api-Platform backend. See the [Getting Started guide](https://api-platform.com/docs/distribution/) to learn more.
34-
3533
#### Linking the Source Version to an existing project
3634

3735
If you already have a project in progress, you can develop directly from it.
3836

3937
The instructions below explain how to install the source version of API Platform Admin in your project and contribute a patch.
4038

41-
Your client should already uses `@api-platform/admin` and its bootstrap file (usually: `src/App.tsx`) should at least contains:
39+
Your client should already use `@api-platform/admin` and its bootstrap file (usually: `src/App.tsx`) should at least contains:
4240

4341
```tsx
4442
import React from 'react';
@@ -99,54 +97,18 @@ yarn dev --force
9997
10098
#### Running Admin through Storybook
10199

102-
If you don't have an existing API Platform application, you can use one of the bundled example APIs, and visualize the admin through [Storybook](https://storybook.js.org/).
103-
104-
Get the source of `@api-platform/admin`:
105-
106-
```shell
107-
cd ..
108-
git clone https://github.com/api-platform/admin.git
109-
```
100+
If you don't have an existing API Platform application, or don't want to use `yarn link`, you can use one of the bundled example APIs, and visualize the admin through [Storybook](https://storybook.js.org/).
110101

111102
Install everything:
112103

113104
```shell
114-
cd admin
115-
# Install JS dependencies
116-
make install
117-
# (optional) Initizalize a .env containing the URL of the API
118-
make cp-env
119-
```
120-
121-
The default API URL is in the `.env`. You can customize it according to your needs:
122-
123-
```env
124-
SIMPLE_HTTP_PORT=8000
125-
SIMPLE_HTTPS_PORT=4430
126-
SIMPLE_ENTRYPOINT=https://localhost:${SIMPLE_HTTPS_PORT}/api
105+
docker compose up
127106
```
128107

129-
Run the simple API Platform backend (uses docker) and launch Storybook:
130-
131-
```shell
132-
make start-simple
133-
```
134-
135-
Go to http://localhost:4430, accept the self-signed certificate, visit http://localhost:6006 to see the running Admin.
108+
Go to http://localhost, accept the self-signed certificate, and see the running Admin.
136109

137110
To stop and prune the simple API Platform backend:
138111

139-
```shell
140-
make stop-simple
141-
```
142-
143-
Each time you change your code, you must restart vite with `--force` option [for your changes to be taken into account](https://vitejs.dev/guide/troubleshooting.html#outdated-pre-bundled-deps-when-linking-to-a-local-package
144-
):
145-
146-
```console
147-
yarn dev --force
148-
```
149-
150112
### Testing Your Changes
151113

152114
Before sending a Pull Request, make sure the tests pass correctly:

0 commit comments

Comments
 (0)