forked from npm/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lifecycle: remove local dependencies other than spawn
PR-URL: npm/npm#18025 Credit: @mikesherov Reviewed-By: @zkat
- Loading branch information
1 parent
f60b05d
commit 4f49f68
Showing
8 changed files
with
122 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict' | ||
|
||
const npm = require('../npm.js') | ||
|
||
module.exports = lifecycleOpts | ||
|
||
function lifecycleOpts () { | ||
return { | ||
config: npm.config.snapshot, | ||
dir: npm.dir, | ||
force: npm.config.get('force'), | ||
group: npm.config.get('group'), | ||
ignorePrepublish: npm.config.get('ignore-prepublish'), | ||
ignoreScripts: npm.config.get('ignore-scripts'), | ||
production: npm.config.get('production'), | ||
scriptShell: npm.config.get('script-shell'), | ||
scriptsPrependNodePath: npm.config.get('scripts-prepend-node-path'), | ||
unsafePerm: npm.config.get('unsafe-perm'), | ||
user: npm.config.get('user') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = require('./utils/lifecycle.js').cmd('restart') | ||
module.exports = require('./utils/lifecycle-cmd.js')('restart') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = require('./utils/lifecycle.js').cmd('start') | ||
module.exports = require('./utils/lifecycle-cmd.js')('start') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = require('./utils/lifecycle.js').cmd('stop') | ||
module.exports = require('./utils/lifecycle-cmd.js')('stop') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.