SSGNode release

sirinoks

Alex Romanova

Posted on November 29, 2021

SSGNode release

NPM - so that's what it means..

As I entered this task, I wasn't fully sure what exactly a "package" meant. It didn't all connect for me. I followed commands in the NPM instructions blindly. Node means you gotta use NPM of course.

Releasing

A release means publishing a working version of your program. Depending on how much you progress with each version, you gotta name it accordingly. Versions are named in a manner of XX.XX.XX, where XX are numbers. The bigger the number you increment - the more important were your changes. Read more here about naming your version.

In an existing project you already should have your package.json. In any case, whenever you do npm init, it asks you a bunch of details about your project. It puts those details exactly in package.json that it creates. You gotta check this file. Are your name, version and description correct? Make sure they are, cause now it's time to publish!

Register on NPM website, confirm your email (yes, you gotta, otherwise shit won't work). Go to your project directory in your CLI. Do npm login, using your account information that you just registered with. Got it? Ok. Now comes the most important step. Do...

npm publish
Enter fullscreen mode Exit fullscreen mode

Magically, you now will have your project in your npm account. Looking all nice, ready and professional. All info from your README.md will display there, so make sure it's all correct!

If you made a mistake, make your changes and then do npm version patch. It will also increment your version by 0.0.1, since that was a patch - a minor change/correction. After that you do npm publish again. All fixed!

What I didn't get

I was very confused at first. I didn't know what a package meant as a word. Sure, I get it's like "a packed thing". But in this context - who knows? I started by following these one by one. It described to make a package out of nothing - when you don't have an existing project ready. That was what confused me - I thought I perhaps should make a separate folder for whatever a package meant and go from there. Only after looking at some other students' instructions (really good post btw) I realized. My package IS my project. It was already there. All I had to do was make sure my versions, names and README's are correct. As usual, turns out it's not as complicated as I thought.

Changes and testing

I barely had to change anything. I thought a little more about versioning systems, it's a neat concept.

My partner might have been too smart. He knew what to do and didn't have any problems following instructions. He's not new to this stuff.

Use my SSGNode!

npm i ssgnode

Final lab

I have enjoyed labs, since they weren't ever too scary to complete and taught me useful things. I especially liked git and testing labs. I actually might have struggled on easy tasks more than others would. It had a good balance of learning something new and not being too challenging at the same time. I'm currently really worried about my release 0.4. But at least labs were never that bad.

💖 💪 🙅 🚩
sirinoks
Alex Romanova

Posted on November 29, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related