package.json scripts code example

Example 1: npm run custom script

# In your package.json you defined a custom script "custom"
# You can run it using
npm run custom

Example 2: what is package.json

metadata specific to the project
a web application, Node.js module, or even just a plain JavaScirpt library. 
identifies the project and acts as a baseline for users and contributors 
to get information about the project.
contains a collection of any given project's dependencies

Example 3: run the scripts in package json

npm run <script-name>

Example 4: custom scripts in package.json

"scripts": {
    "homedata": "node export.js homedata",
  },
 //In the terminal type
 npm run homedata