blob: bb802f45ee08c3e8b2603924add504f7e581c900 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
exports = module.exports = cmd
var npm = require('../npm.js')
var usage = require('./usage.js')
function cmd (stage) {
function CMD (args, cb) {
npm.commands['run-script']([stage].concat(args), cb)
}
CMD.usage = usage(stage, 'npm ' + stage + ' [-- <args>]')
var installedShallow = require('./completion/installed-shallow.js')
CMD.completion = function (opts, cb) {
installedShallow(opts, function (d) {
return d.scripts && d.scripts[stage]
}, cb)
}
return CMD
}
|