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: README.md
+40-6Lines changed: 40 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,34 +85,68 @@ npm run reinstall
85
85
npm run clear-turbo-cache
86
86
```
87
87
88
-
### Linking with the Perses UI
88
+
### Linking with Local Projects
89
89
90
-
To link these shared libraries with your local Perses UI development environment, use the provided script:
90
+
To link these shared libraries with your local Perses UI or plugins development environment, use the provided script:
91
91
92
92
```bash
93
93
./scripts/link-with-perses/link-with-perses.sh
94
94
```
95
95
96
-
The script will back up your current dependencies, build and link the shared libraries for local development. It will search for the Perses UI app as a sibling directory by default. See the script helper for more details:
96
+
The script will back up your current dependencies, build and link the shared libraries for local development. By default, it will search for the Perses UI app as a sibling directory. You can also link with plugins by using the `--plugins` flag.
> As the shared dependencies are file references, you cannot build the Perses UI for production while linked to local shared libraries. Make sure to unlink the shared libraries before building for production.
127
+
> As the shared dependencies are file references, you cannot build for production while linked to local shared libraries. Make sure to unlink the shared libraries before building for production.
104
128
105
-
#### Regular workflow
129
+
#### Workflow for Perses UI Development
106
130
107
131
1. Clone the perses repo [https://github.com/perses/perses](https://github.com/perses/perses)
108
132
2. From the perses `ui` folder install the ui dependencies with `npm install`.
109
133
3. From the perses root folder, start the Perses API in dev mode with `./scripts/api_backend_dev.sh`.
110
134
4. Clone this shared repo and install dependencies with `npm install`. ⚠️ Do not rename the cloned repo, otherwise it breaks the paths resolution on the perses repo side.
111
-
5. From the shared root folder, run `./scripts/link-with-perses/link-with-perses.sh`. If your perses repo is in a different location than a sibling directory, use the `--path` option to specify its location.
135
+
5. From the shared root folder, run `./scripts/link-with-perses/link-with-perses.sh link`. If your perses repo is in a different location than a sibling directory, use the `--perses` option to specify its location.
112
136
6. From the perses `ui/app` folder, run `npm run start:shared` to start the Perses UI in dev mode using the linked shared libraries with hot module reloading.
113
137
7. Make changes to the shared libraries and see them reflected in your local Perses UI.
114
138
8. When done, run `./scripts/link-with-perses/link-with-perses.sh unlink` to restore the original dependencies in the Perses UI.
115
139
140
+
#### Workflow for Plugins Development
141
+
142
+
1. Clone the plugins repo [https://github.com/perses/plugins](https://github.com/perses/plugins)
143
+
2. From the plugins root folder install dependencies with `npm install`.
144
+
3. Clone this shared repo and install dependencies with `npm install`.
145
+
4. From the shared root folder, run `./scripts/link-with-perses/link-with-perses.sh link --plugins`. If your plugins repo is in a different location than a sibling directory, use the `--plugins` option with the custom path.
146
+
5. From the plugins root folder, run the appropriate development command for your plugin.
147
+
6. Make changes to the shared libraries and see them reflected in your plugins.
148
+
7. When done, run `./scripts/link-with-perses/link-with-perses.sh unlink --plugins` to restore the original dependencies in the plugins repo.
149
+
116
150
## Contributing
117
151
118
152
Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our development process and how to submit pull requests.
0 commit comments