diff --git a/docs/CONTRIBUTING.en.md b/docs/CONTRIBUTING.en.md index 1db282e..0ed294b 100644 --- a/docs/CONTRIBUTING.en.md +++ b/docs/CONTRIBUTING.en.md @@ -28,3 +28,30 @@ Thank you for your PR! Before creating a PR, please check the following: 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.