Step#1: Let's create a new Github Repository

Head over to https://github.com/new , Enter the name and description , check the box to initialize the repo with a README file, Select Node for .gitignore file and select MIT License as the license. and then click on Create Repository

Now you should see your newly created repository. In this case its https://github.com/dhruv-kumar-jha/graphql-for-beginners

Let's clone this repository locally, git clone https://github.com/dhruv-kumar-jha/graphql-for-beginners.git .

After cloning, lets move into the cloned directory and in terminal run the command yarn init or npm init -y this will initialize npm and create our package.json file with default options.

You can easily edit package.json file and make any/all the changes you want there.

We will be making use of Yarn dependency manager to manage all of our dependencies, You can find more info here https://yarnpkg.com/en/ , However all the commands can very easily be replicated with npm

If you're having trouble creating repository or cloning it, you can go through this tutorial http://www.dhruvkumarjha.com/articles/writing-and-publishing-a-simple-javascript-module-to-npm