Let's dive a little deeper into npm, by looking at some of the handy npm commands that you will often use:
- npm init: Initializes a Node.js project. This should be run at the root of your project and will create a respective package.json file. This file usually has the following parts (keys):
- name: Name of the project.
- version: Version of the project.
- description: Project description.
- main: The entry-point to your project, the main file.
- scripts: This will be a list of other keys whose values will be the scripts to be run, for example, test, dev-server. Therefore, to run this script, you will only need to type commands such as npm run dev-server, npm run test, and so on.
- dependencies: List of third-party packages and their ...