Steps to create and initialize project with VS CODE
Step 1
Create new project in Visual Studio code
Here I have created an empty project named helloworldtest , and open it using VS CODE IDE
Step 2 - Create package.json file
Because at first glance we dont have anything , so we should create package.json file by executing following command
By executing above command , there are some questions you should answer it as follows,
After entering command npm init , you can see that they ask you about name of project, but keep in mind that name should be small latters and can not contain digits
Step-3
Then the next step to specify version
I have given 1.0.0 but you can give version as appropriate for your package release
Step-4
Than provide description about package and entry point of your package when project is loaded
As you can see in the above screenshot, I have provided a simple description that would publish when someone goes through your package
Step-5
Some more steps like Providing git repository , keywords and Author name to identify the creator of current package
I have entered some details like helloworldtest [which is unique by the way] and test command
NOTE
I have not provided git repository , but if you already have created empty repository you can specify its URL
Step-6
Last step is a summary , in which you can see all the information provided by you
That's it , we have created package.json file with all the needed information
NOTE
Before we publish package we should have account created with npmjs.com site , so that we can publish it by login credential .
Steps to create user and login through VS CODE
Step 1
Firstly we need to add user by using following command