Lines Matching full:scripts
27 // or a package, in which case, complete against its scripts
32 var scripts = Object.keys(d.scripts || {})
33 console.error('local scripts', scripts)
34 if (scripts.indexOf(argv[2]) !== -1) return cb()
42 var scripts = Object.keys(d.scripts || {})
43 return cb(null, scripts)
51 cb(null, Object.keys(d.scripts || {}))
84 var allScripts = Object.keys(d.scripts || {})
85 var scripts = []
88 if (cmdList.indexOf(script) !== -1) scripts.push(script)
97 output(JSON.stringify(d.scripts || {}, null, 2))
103 output(script + ':' + d.scripts[script])
110 if (scripts.length) {
111 output('Lifecycle scripts included in %s:', d.name)
113 scripts.forEach(function (script) {
114 output(prefix + script + s + d.scripts[script])
116 if (!scripts.length && runScripts.length) {
117 output('Scripts available in %s via `npm run-script`:', d.name)
122 output(prefix + script + s + d.scripts[script])
129 if (!pkg.scripts) pkg.scripts = {}
132 if (cmd === 'restart' && !pkg.scripts.restart) {
139 if (pkg.scripts[cmd] == null) {
141 pkg.scripts.test = 'echo \'Error: no test specified\''
145 pkg.scripts[cmd] = 'SET'
148 pkg.scripts[cmd] = 'env'
153 let suggestions = didYouMean(cmd, Object.keys(pkg.scripts))
168 if (pkg.scripts[c] && c === cmd) {
169 pkg.scripts[c] = pkg.scripts[c] + joinArgs(args)
172 // when running scripts explicitly, assume that they're trusted.