addAddonsToProject(options) {
    let taskOptions = {
      packages: [],
      extraArgs: options.extraArgs || [],
      blueprintOptions: options.blueprintOptions || {},
    };

    let packages = options.packages;
    if (packages && packages.length) {
      taskOptions.packages = packages.map((pkg) => {
        if (typeof pkg === 'string') {
          return pkg;
        }

        if (!pkg.name) {
          throw new SilentError('You must provide a package `name` to addAddonsToProject');
        }

        if (pkg.target) {
          pkg.name += `@${pkg.target}`;
        }

        return pkg.name;
      });
    } else {
      throw new SilentError('You must provide package to addAddonsToProject');
    }

    let installText = packages.length > 1 ? 'install addons' : 'install addon';
    this._writeStatusToUI(chalk.green, installText, taskOptions['packages'].join(', '));

    let previousCwd;
    if (!this.project.isEmberCLIProject()) {
      // our blueprint ran *outside* an ember-cli project. So the only way this
      // makes sense if the blueprint generated a new project, which we're now
      // ready to add some addons into. So we need to switch from "outside" mode
      // to "inside" by reinitializing the Project.
      //
      // One might think the cache clear is unnecessary, because in theory the
      // caches should be shareable, but in practice the new Project we create
      // below will have the same root dir as the NullProject and that makes bad
      // things happen.
      this.project.packageInfoCache._clear();
      const Project = require('../../lib/models/project');
      this.project = taskOptions.blueprintOptions.project = Project.closestSync(
        options.blueprintOptions.target,
        this.project.ui,
        this.project.cli
      );

      // The install task adds dependencies based on the current working directory.
      // But in case we created the new project by calling the blueprint with a custom target directory (options.target),
      // the current directory will *not* be the one the project is created in, so we must adjust this here.
      previousCwd = process.cwd();
      process.chdir(options.blueprintOptions.target);
    }

    let result = this.taskFor('addon-install').run(taskOptions);
    if (previousCwd) {
      return result.then(() => process.chdir(previousCwd));
    }

    return result;
  }
Used to add multiple addons to the project's `package.json` and run their
    `defaultBlueprint` if they provide one.

    Generally, this would be done from the `afterInstall` hook, to
    ensure that a package that is required by a given blueprint is
    available.

    @method addAddonsToProject
    @param {Object} options
    @return {Promise}