Subject: Custom scripts
Author: WebSpider
In response to: Predefined scripts
Posted on: 04/22/2021 10:11:14 PM
package.json:
...
"scripts": {
"start": "node index.js",
"hello": "echo 'Hello World!'"
}
...
NOTE: The custom scripts must be executed by adding
run like:
C:\tmp\npm-scripts\hello>npm run hello
> hello@1.0.0 hello C:\tmp\npm-scripts\hello
> echo 'Hello World!'
'Hello World!'
>
> On 04/22/2021 10:07:57 PM
WebSpider wrote:
Predefined scripts:
...
npm init
nmp intsall
npm start
...
https://docs.npmjs.com/cli/v7/using-npm/scripts
References: