Configuring your project with NPM

With the installation of Node, the Node Package Manager (NPM) is also installed. NPM is actually the utility that we will use for our normal development cycle.

NPM allows you to install libraries, manage the dependencies of your projects, and define a set of commands to build your code.

To start, just create a new folder for your project and initialize it from there:

$ me@~> mkdir validator
$ me@~> cd validator
$ me@~/validator> npm init

The last command, npm init, will invoke NPM to generate package.json inside the current directory; during the process, it will ask you some questions. Most of them are self-explanatory, but if you do not know what to answer just press ENTER. Do not worry; you will be able to edit ...

Get Learning Behavior-driven Development with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.