2

What is the scripts section inside package.json?

"scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start-me" : "node one.js", "start-over" : "node two.js" 

}

What does start-me and start-over mean here?

1 Answer 1

7

The 'scripts' section can be used by the npm or yarn commands to allow you to do the following; npm run start-me at which point it will execute node one.js

Sign up to request clarification or add additional context in comments.

2 Comments

I could directly run node one.js. Is there any specific use?
Of course , scripts section is only an alias to do one or more command, is more an abstraction to final user of your user, example: your test commands are long ugly and with few flags but you easy create the script npm test and your final user don't see the ugly command, understand now?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.