MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / toNpmArgs

Method toNpmArgs

lib/tasks/npm-task.js:219–249  ·  view source on GitHub ↗
(command, options)

Source from the content-addressed store, hash-verified

217 }
218
219 toNpmArgs(command, options) {
220 let args = [command];
221
222 if (options.save) {
223 args.push('--save');
224 }
225
226 if (options['save-dev']) {
227 args.push('--save-dev');
228 }
229
230 if (options['save-exact']) {
231 args.push('--save-exact');
232 }
233
234 if ('optional' in options && !options.optional) {
235 args.push('--no-optional');
236 }
237
238 if (options.verbose) {
239 args.push('--loglevel', 'verbose');
240 } else {
241 args.push('--loglevel', 'error');
242 }
243
244 if (options.packages) {
245 args = args.concat(options.packages);
246 }
247
248 return args;
249 }
250
251 toYarnArgs(command, options) {
252 let args = [];

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected