I am currently working on developing a custom NPM package that will serve as a repository for sharing types and functions across my project. Let's name this project wordle. Given the emphasis on types, it is worth noting that I am using TypeScript for this project. My goal is to be able to import these types and functions in the following manner:
import { Move } from "wordle-shared/types";
import { getValidWords } from "wordle-shared/utils"
I would appreciate it if someone could guide me on how I should structure this NPM package to achieve the desired organization. I have noticed that some developers use @ in their package names (e.g. @wordle-shared), so I am open to incorporating that naming convention if necessary.
Currently, my folder structure looks like this:
wordle-shared
├── src
│ ├── types
│ └── utils
├── package.json
├── tsconfig.json
├── .gitignore