go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Scripts chain-calling
 
Subject: Scripts chain-calling
Author: WebSpider
In response to: Scripts calling scripts
Posted on: 04/22/2021 10:22:36 PM

package.json:

...
"scripts": {
    "start": "node index.js",
    "hello": "echo 'Hello World!'",
    "calling-hello": "npm run hello",
    "calling-hello-and": "npm run hello && echo 'Hello NPM!'"
}
...

C:\tmp\npm-scripts\hello>npm run calling-hello-and

> hello@1.0.0 calling-hello-and C:\tmp\npm-scripts\hello
> npm run hello && echo 'Hello NPM!'


> hello@1.0.0 hello C:\tmp\npm-scripts\hello
> echo 'Hello World!'

'Hello World!'
'Hello NPM!'


 

> On 04/22/2021 10:15:30 PM WebSpider wrote:

package.json:
...
"scripts": {
    "start": "node index.js",
    "hello": "echo 'Hello World!'"
    "calling-hello": "npm run hello",
}
...


C:\tmp\npm-scripts\hello>npm run calling-hello

> hello@1.0.0 calling-hello C:\tmp\npm-scripts\hello
> npm run hello


> hello@1.0.0 hello C:\tmp\npm-scripts\hello
> echo 'Hello World!'

'Hello World!'





References:

 


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