Lines Matching refs:scripts
21 static description = 'Run arbitrary package scripts'
27 'ignore-scripts',
28 'foreground-scripts',
41 const { content: { scripts = {} } } = await pkgJson.normalize(npm.localPrefix)
44 return Object.keys(scripts).map(s => `${s}\t${scripts[s].slice(0, 30)}`)
46 return Object.keys(scripts)
75 const { scripts = {} } = pkg
77 if (event === 'restart' && !scripts.restart) {
78 scripts.restart = 'npm stop --if-present && npm start'
79 } else if (event === 'env' && !scripts.env) {
80 scripts.env = isWindowsShell ? 'SET' : 'env'
83 pkg.scripts = scripts
86 !Object.prototype.hasOwnProperty.call(scripts, event) &&
95 `Missing script: "${event}"${suggestions}\n\nTo see a list of scripts, run:\n npm run`
101 if (!this.npm.config.get('ignore-scripts')) {
102 if (scripts[`pre${event}`]) {
106 if (scripts[`post${event}`]) {
131 const { content: { scripts, name, _id } } = await pkgJson.normalize(path || this.npm.localPrefix)
134 if (!scripts) {
138 const allScripts = Object.keys(scripts)
144 this.npm.output(JSON.stringify(scripts, null, 2))
149 for (const [script, cmd] of Object.entries(scripts)) {
168 `${colorize.reset(colorize.bold('Lifecycle scripts'))} included in ${colorize.green(
175 this.npm.output(prefix + script + indent + colorize.dim(scripts[script]))
189 this.npm.output(prefix + script + indent + colorize.dim(scripts[script]))
226 const { content: { scripts, name } } = await pkgJson.normalize(workspacePath)
227 res[name] = { ...scripts }
235 const { content: { scripts, name } } = await pkgJson.normalize(workspacePath)
236 for (const [script, cmd] of Object.entries(scripts || {})) {