Skip to content

Commit b13e7bf

Browse files
authored
Merge pull request #145 from bekzod/cleanup
cleanup `readPackageJSON`
2 parents c3a8c83 + 91ffe0c commit b13e7bf

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/ember-app.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -363,20 +363,18 @@ class EmberApp {
363363
manifest = this.transformManifestFiles(manifest);
364364
}
365365

366-
var appFiles = [];
367366
debug("reading array of app file paths from manifest");
368-
manifest.appFiles.forEach(function(appFile) {
369-
appFiles.push(path.join(distPath, appFile));
367+
var appFiles = manifest.appFiles.map(function(appFile) {
368+
return path.join(distPath, appFile);
370369
});
371370

372-
var vendorFiles = [];
373371
debug("reading array of vendor file paths from manifest");
374-
manifest.vendorFiles.forEach(function(vendorFile) {
375-
vendorFiles.push(path.join(distPath, vendorFile));
372+
var vendorFiles = manifest.vendorFiles.map(function(vendorFile) {
373+
return path.join(distPath, vendorFile);
376374
});
377375

378376
return {
379-
appFiles: appFiles,
377+
appFiles: appFiles,
380378
vendorFiles: vendorFiles,
381379
htmlFile: path.join(distPath, manifest.htmlFile),
382380
moduleWhitelist: pkg.fastboot.moduleWhitelist,

0 commit comments

Comments
 (0)