So, about a year ago, I was trying to make a Node.JS module. Let's just say I failed. Well, when it came to publishing I just couldn't. Well, I've fixed that here. This guide will go into detail on the steps to publish your very own Node.JS module.
Fork this Repl, and this part is important DELETE THE PACKAGE.JSON AND THE PACKAGE-LOCK.JSON FILES Do this so you have the correct configuration. I DO NOT reccomend you edit it by hand, unless you know what you are doing (most of you following this tutorial do not). If you are curious, package.json contains your author name, package name, and version (test commands too, but we don't get into that now.) Package-Lock.json contains stuff depending on the name of your template (in package.json). Feel free to take a look inside of them!
Run npm init
and fill out the information. The command you just used (npm init) creates package-lock.json and package.json (we went over it in step 1)
Now, you should have a few files, main.js is the one we need. You'll see when you open it, there is some code. You can delete that if you'd like.