DEV Community

Neil An
Neil An

Posted on

Releasing my SSG with NPM

Hi everyone,

This week I released my static site generator to the npm registry.

The process for releasing my package was simple. First, you need to sign up on the npm website. Next, you need to make sure you have a package.json file in the root directory of your project. Then, created a README.md file to document how to use your package. Finally, issue the npm publish command to publish your package to the npm registry.

I didn't have to change much in my code to accommodate the release at first. But when I asked my friend to test it out for me, he found a couple things that I needed to change. First, the npm link command that I had wrote in the README file did not work. This was because the command looks for a package.json file in the current directory, but since he installed using npm, there was no package.json file in his current directory. Therefore I had to make a change from npm link to npm link nan1-ssg. The second thing he found was minor, but he saw that when he printed the version number using nan1-ssg -v, it was 0.2, not 1.01. `This was an easy fix and I updated the version number.

To try out my SSG, follow the instructions here. The README file should provide the documentation you need to use my project.

Top comments (0)