Publish a Gatsby Theme to npm

Jason Lengstorf
InstructorJason Lengstorf

Share this video with your friends

Send Tweet

Make your Gatsby theme available for use by anyone in the community by publishing it as an npm package.

For a written version of this course, check out the Gatsby docs.

Samuel Suther
Samuel Suther
~ 8 months ago

What is the recommended way to have a workspace which directly use such "scoped" theme-packages? I've found that it is not that easy to make this work. Do you have any suggestion how to archive this, or do you only recommend to change the package.json name to a scoped one before uploading it to registry, and after that rename it back?

Jason Lengstorf
Jason Lengstorfinstructor
~ 8 months ago

with workspaces, you can still use scoped packages. for example, if you name a package @egghead/party, you could run its develop script with yarn workspaces using:

yarn workspace @egghead/party develop

is that what you're asking? if not, let me know what you're trying to achieve and we'll get it figured out. thanks!

Samuel Suther
Samuel Suther
~ 8 months ago

Ok, I've solved it now. Thanks a lot.