You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+4-42Lines changed: 4 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -30,15 +30,13 @@ You can patch `@api-platform/admin` by two different ways:
30
30
- by linking `@api-platform/admin` sources to an existing project;
31
31
- by installing this project and running it through Storybook.
32
32
33
-
> Prerequiste: running Api-Platform backend. See the [Getting Started guide](https://api-platform.com/docs/distribution/) to learn more.
34
-
35
33
#### Linking the Source Version to an existing project
36
34
37
35
If you already have a project in progress, you can develop directly from it.
38
36
39
37
The instructions below explain how to install the source version of API Platform Admin in your project and contribute a patch.
40
38
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:
42
40
43
41
```tsx
44
42
importReactfrom'react';
@@ -99,54 +97,18 @@ yarn dev --force
99
97
100
98
#### Running Admin through Storybook
101
99
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/).
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/).
110
101
111
102
Install everything:
112
103
113
104
```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:
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.
136
109
137
110
To stop and prune the simple API Platform backend:
138
111
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
-
150
112
### Testing Your Changes
151
113
152
114
Before sending a Pull Request, make sure the tests pass correctly:
0 commit comments