How to release a Gatsby Plugin (or anything really) to npm
I was sure releasing packages on npm was a super complex process! I made it into this thing only developers better than I was worthy of doing.
It turns out it's super straightforward; any folder of code with a valid package.json may become an npm package.
- Create a free account on npmjs.com
- In your terminal, move into the folder you want to release as a package
- Create the
package.json
withnpm init
- Type
npm publish
and follow the promps
That's it; it will now be available for anyone anywhere to use 🤯
If the folder of code you decide to publish is worthy of becoming a package, though, that is another discussion altogether 🤪
All the best,
Queen Raae
PS: You probably want to automate this process, and we will look at that in tonight's unauthorized and rum-fueled treasure hunt in the sharky waters around the Gatsby islands.