go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Custom scripts
 
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:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.