explain how to test local changes

This commit is contained in:
dakkar 2024-03-09 12:47:05 +00:00
parent f5359d4656
commit 8fa16de198

View file

@ -28,3 +28,30 @@ Thank you for your PR! Before creating a PR, please check the following:
Thanks for your cooperation 🤗 Thanks for your cooperation 🤗
## Testing with Sharkey
Let's say you have Sharkey checked out at `~/src/Sharkey`, and this
repository at `~/src/sfm-js`. You have made some modifications to this
code, and want to run Sharkey with your modifications.
```shell
cd ~/src/Sharkey
pnpm --filter=backend add ../../../sfm-js
pnpm --filter=frontend add ../../../sfm-js
```
this will replace the "real" `@transfem-org/sfm-js` in the
dependencies, with your local version. Remember to *not* commit the
changes to `package.json` that this causes! (`pnpm link` should also
work, but I couldn't figure it out)
Then you'll need to tell Vite to handle that package specially. Edit
`packages/frontend/vite.config.local-dev.ts` and add, before `define`:
```json
optimizeDeps: {
include: ['@transfem-org/sfm-js'],
},
```
Now you can `pnpm dev` and test your changes.