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

Method packageVendorJs

lib/broccoli/default-packager.js:1237–1264  ·  view source on GitHub ↗
(tree)

Source from the content-addressed store, hash-verified

1235 * @return {BroccoliTree}
1236 */
1237 packageVendorJs(tree) {
1238 let importPaths = Object.keys(this.scriptOutputFiles);
1239
1240 // iterate over the keys and concat files
1241 // to support scenarios like
1242 // app.import('vendor/foobar.js', { outputFile: 'assets/baz.js' });
1243 let vendorTrees = importPaths.map((importPath) => {
1244 let files = this.scriptOutputFiles[importPath];
1245 let isMainVendorFile = importPath === this.distPaths.vendorJsFile;
1246
1247 const vendorObject = getVendorFiles(files, isMainVendorFile);
1248
1249 return concat(tree, {
1250 inputFiles: vendorObject.inputFiles,
1251 headerFiles: vendorObject.headerFiles,
1252 footerFiles: vendorObject.footerFiles,
1253 outputFile: importPath,
1254 annotation: `Package ${importPath}`,
1255 separator: '\n;',
1256 sourceMapConfig: this.sourcemaps,
1257 });
1258 });
1259
1260 return mergeTrees(vendorTrees, {
1261 overwrite: true,
1262 annotation: 'Packaged Vendor Javascript',
1263 });
1264 }
1265};

Callers 1

packageJavascriptMethod · 0.95

Calls 1

getVendorFilesFunction · 0.85

Tested by

no test coverage detected