Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2015-08-03 22:41:47 +0300
committerRebecca Turner <me@re-becca.org>2015-08-08 02:06:45 +0300
commit22444adb8d6c504e2137fb5d5240d28ee12a9b8d (patch)
tree15a70702e536a9b62e914b78b0d8f8740bad8a7e /lib
parentbcc8c0aa9aed56c7c0a67bc4e9cdb5c16bd2f4c1 (diff)
run-script: include `version` in lifecycle output
`preversion`, `version`, and `postversion` lifecycle scripts were getting included in the generic run-script section instead of being listed as lifecycle events when running `npm run-script` with no arguments. Fixes: #9146 PR-URL: https://github.com/npm/REPO/pull/9149
Diffstat (limited to 'lib')
-rw-r--r--lib/run-script.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/run-script.js b/lib/run-script.js
index cd57b4570..8c99c29b8 100644
--- a/lib/run-script.js
+++ b/lib/run-script.js
@@ -68,7 +68,8 @@ function list (cb) {
'test',
'stop',
'start',
- 'restart'
+ 'restart',
+ 'version'
].reduce(function (l, p) {
return l.concat(['pre' + p, p, 'post' + p])
}, [])