splashcards-shared-types
v1.0.60
Published
- [Quick Start](#quick-start) - [Updating types](#updating-types) - [Linking a NextJS project with these shared types](#linking-a-nextjs-project-with-these-shared-types) - [Notes](#notes) - [Shared Types Repo Setup](#shared-types-repo-setup) - [pack
Downloads
18
Readme
- Quick Start
- Linking a NextJS project with these shared types
- Shared Types Repo Setup
- Troubleshooting
- Reference
Splashcards App Shared TypeScript Types
Quick Start
Note: You should only need to do this once.
- Clone this repo and run
bun link
. - Then, in your project that uses these types, run
bun link supabase-shared-types
.
Updating types
You should run bun ci
after each update to the types, so your other projects are refreshed.
- Add/update your types, then run
bun ci
which willclean
andbuild
new types. - For projects hosted on Vercel, you must
bun pub
to publish these types to NPM.
Linking a NextJS project with these shared types
https://chatgpt.com/share/58780926-f656-46f7-b106-7a033b075789
Notes
- Main project (NextJS) will use types in the
dist
directory, which is why it must be refreshed each time.
Shared Types Repo Setup
- Remove
dist
from.gitignore
, so thedist
files are in the repo
package.json
"files": [
"/dist"
],
Troubleshooting
Types are not reflected in Vercel
- Remove
bun.lockb
andnode_modules
from NextJS project and re-install usingbun i
, then push again.
Reference
- https://github.com/masaok/react-hook-gyroscope/blob/main/package.json