MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / run

Method run

lib/tasks/addon-install.js:16–48  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

14 }
15
16 run(options) {
17 const { default: chalk } = require('chalk');
18 let ui = this.ui;
19 let packageNames = options.packages || [];
20 let blueprintOptions = options.blueprintOptions || {};
21 let commandOptions = blueprintOptions;
22
23 let npmInstall = new this.NpmInstallTask({
24 ui: this.ui,
25 project: this.project,
26 });
27
28 let blueprintInstall = new this.BlueprintTask({
29 ui: this.ui,
30 project: this.project,
31 testing: this.testing,
32 });
33
34 ui.startProgress(chalk.green('Installing addon package'), chalk.green('.'));
35
36 return npmInstall
37 .run({
38 packages: packageNames,
39 save: commandOptions.save,
40 'save-dev': !commandOptions.save,
41 'save-exact': commandOptions.saveExact,
42 packageManager: commandOptions.packageManager,
43 })
44 .then(() => this.project.reloadAddons())
45 .then(() => this.installBlueprint(blueprintInstall, packageNames, blueprintOptions))
46 .finally(() => ui.stopProgress())
47 .then(() => ui.writeLine(chalk.green('Installed addon package.')));
48 }
49
50 installBlueprint(install, packageNames, blueprintOptions) {
51 let blueprintName,

Callers 1

installBlueprintMethod · 0.45

Calls 4

runMethod · 0.95
installBlueprintMethod · 0.95
reloadAddonsMethod · 0.80
thenMethod · 0.45

Tested by

no test coverage detected