The Library-Docs Monorepo Template
Published ....
Last modified ....
Share this post on BlueskySee discussion on Bluesky
I was talking with @scottykaye the other day since he was starting to scaffold out a small frontend app to demo and document one of his open source libraries, and brought up using a monorepo to support both the library (which can be published to NPM) and a documentation site (and more).
He wanted to learn a bit more about the setup and recommended that I write a brief blog post about the structure that I usually reach for in these cases, which I've iterated on quite a bit since some of my very early open source endeavors.
If you just want to get started with the template and don't care too much about how to set it up yourself, you can start from this template monorepo.
Recommended Tooling:
These days I mostly use Bun as my package manager for my
projects, so I'll be using it in this blog post, but the same setup should work
perfectly fine with yarn and (and probably as well - but I
haven't used it personally).