The package.json file contains a field named scripts. This field can contain multiple entries, and each entry is used to create a command. A command can execute any kind of custom logic.
When we create the package.json file using the npm init command, the default command is not implemented:
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
In a real-world scenario, we would have multiple commands as in the following example:
{
"name": "repository-name",
"version": "1.0.0",
"description": "example",
"main": "index.html",
"scripts": {
"start": "node ./src/index.js",
"test": "gulp test",
"lint": "tslint -c tslint...