electron-trpc icon indicating copy to clipboard operation
electron-trpc copied to clipboard

Add vanilla typescript example

Open JoeHartzell opened this issue 2 years ago • 1 comments
trafficstars

Summary

This PR adds a vanilla typescript example project. The project uses a minimal configuration of electron-vite. It also adds some e2e tests for queries, subscriptions, and multi-window support. Used #38 as a starting point.

Changes

  • Rebased and updated #38
    • Installed electron-trpc as workspace:*
    • Update tRPC usage
  • Implemented a minimal electron-vite configuration
  • Implemented E2E tests
    • Multi-window tests (using subscriptions)
    • Query tests
    • Mutation tests

Considerations

I personally think electron-vite results in a cleaner setup for the example repos. It's well documented and includes support for multiple different use cases. If we end up merging this we may want to consider updating the other examples to follow the electron-vite standard.

I couldn't get the vite setup exactly how I wanted it. There is no support for HMR and the entrypoint in the vite config for renderer is a probably incorrect. The project runs and test pass, but the development experience could be improved.

JoeHartzell avatar Jun 20 '23 07:06 JoeHartzell

Deploy Preview for electron-trpc ready!

Name Link
Latest commit d6ebabc9a7b68d0080c425339b5d474750167e16
Latest deploy log https://app.netlify.com/sites/electron-trpc/deploys/6491573f6a3f380008f56bb2
Deploy Preview https://deploy-preview-155--electron-trpc.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Jun 20 '23 07:06 netlify[bot]