Skip to main content

Posts

Showing posts with the label webdriverIO

package.json in any node JS project

What is package.json in any node JS project? package.json is the heart of any Node.js project. Every Node JS project should have this file at the root directory. This file lists: • All the packages/modules needed for a Node JS project and their requested versions. • Several different directives or elements that tell NPM “How to handle the project” like scripts that can be run to automate tasks within the project. • All the metadata for a project, such as a name, the author, the license, etc. It makes your build reproducible, and therefore easier to share with other developers. In Simple words , if you have worked on any Java/Maven project- what pom.xml is for maven project; is the same as what package.json is for any Node JS Project. How we can generate it (package.json)? 1. Using “npm init” : Running this command (‘npm init’) will set up a new NPM package. On initializing, you will be prompted to enter a few answers. Once you answer those and if it worked successf