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
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils/lifecycle-cmd.js')
-rw-r--r--lib/utils/lifecycle-cmd.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/utils/lifecycle-cmd.js b/lib/utils/lifecycle-cmd.js
index 40a90aa20..83a712cf4 100644
--- a/lib/utils/lifecycle-cmd.js
+++ b/lib/utils/lifecycle-cmd.js
@@ -1,12 +1,11 @@
// The implementation of commands that are just "run a script"
// test, start, stop, restart
-const npm = require('../npm.js')
const usageUtil = require('./usage.js')
+const completion = require('./completion/none.js')
-module.exports = stage => {
- const cmd = (args, cb) => npm.commands.run([stage, ...args], cb)
+module.exports = (npm, stage) => {
+ const cmd = (args, cb) => npm.commands['run-script']([stage, ...args], cb)
const usage = usageUtil(stage, `npm ${stage} [-- <args>]`)
- const completion = require('./completion/none.js')
return Object.assign(cmd, { usage, completion })
}