This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
Restart script always runs stop and start #1999
Closed
Description
As per npm help scripts
:
Note: npm restart will run the stop and start scripts if no restart script is provided.
But in reality this package.json
:
{
"name": "example",
"version": "0.0.1",
"scripts": {
"start": "echo 'start'",
"stop": "echo 'stop'",
"restart": "echo 'restart'"
}
}
results in this behavior:
$ node -v
v0.6.6
$ npm -v
1.1.0-beta-4
$ npm restart
> [email protected] stop /tmp/example
> echo 'stop'
stop
> [email protected] restart /tmp/example
> echo 'restart'
restart
> [email protected] start /tmp/example
> echo 'start'
start
Activity