packageVendorJs(tree) {
    let importPaths = Object.keys(this.scriptOutputFiles);

    // iterate over the keys and concat files
    // to support scenarios like
    // app.import('vendor/foobar.js', { outputFile: 'assets/baz.js' });
    let vendorTrees = importPaths.map((importPath) => {
      let files = this.scriptOutputFiles[importPath];
      let isMainVendorFile = importPath === this.distPaths.vendorJsFile;

      const vendorObject = getVendorFiles(files, isMainVendorFile);

      return concat(tree, {
        inputFiles: vendorObject.inputFiles,
        headerFiles: vendorObject.headerFiles,
        footerFiles: vendorObject.footerFiles,
        outputFile: importPath,
        annotation: `Package ${importPath}`,
        separator: '\n;',
        sourceMapConfig: this.sourcemaps,
      });
    });

    return mergeTrees(vendorTrees, {
      overwrite: true,
      annotation: 'Packaged Vendor Javascript',
    });
  }
/*.js`];
    let headerFiles = ['vendor/ember-cli/app-prefix.js'];
    let footerFiles = [
      'vendor/ember-cli/app-suffix.js',
      'vendor/ember-cli/app-config.js',
      'vendor/ember-cli/app-boot.js',
    ];

    return concat(tree, {
      inputFiles,
      headerFiles,
      footerFiles,
      outputFile: this.distPaths.appJsFile,
      annotation: 'Packaged Application Javascript',
      separator: '\n;',
      sourceMapConfig: this.sourcemaps,
    });
  }

  /*
Concatenates all application's vendor javascript Broccoli trees into one, as follows:

Given an input tree that looks like:
```
addon-tree-output/
  ember-ajax/
  ember-data/
  ember-engines/
  ember-resolver/
  ...
the-best-app-ever/
  components/
  config/
  helpers/
  routes/
  ...
vendor/
  ...
  babel-core/
  ...
  broccoli-concat/
  ...
  ember-cli-template-lint/
  ...
```

Returns:

```
assets/
  vendor.js
  vendor.map (if sourcemaps are enabled)
```

@method packageVendorJs
@param {BroccoliTree} tree
@return {BroccoliTree}