(install, packageNames, blueprintOptions)
| 48 | } |
| 49 | |
| 50 | installBlueprint(install, packageNames, blueprintOptions) { |
| 51 | let blueprintName, |
| 52 | taskOptions, |
| 53 | addonInstall = this; |
| 54 | |
| 55 | return packageNames.reduce( |
| 56 | (promise, packageName) => |
| 57 | promise.then(() => { |
| 58 | blueprintName = addonInstall.findDefaultBlueprintName(packageName); |
| 59 | if (blueprintName) { |
| 60 | taskOptions = merge( |
| 61 | { |
| 62 | args: [blueprintName], |
| 63 | ignoreMissingMain: true, |
| 64 | }, |
| 65 | blueprintOptions || {} |
| 66 | ); |
| 67 | |
| 68 | return install.run(taskOptions); |
| 69 | } else { |
| 70 | addonInstall.ui.writeWarnLine( |
| 71 | `Could not figure out blueprint name from: "${packageName}". ` + |
| 72 | `Please install the addon blueprint via "ember generate <addon-name>" if necessary.` |
| 73 | ); |
| 74 | } |
| 75 | }), |
| 76 | Promise.resolve() |
| 77 | ); |
| 78 | } |
| 79 | |
| 80 | findDefaultBlueprintName(givenName) { |
| 81 | let packageName = getPackageBaseName(givenName); |
no test coverage detected