Improvements to the packager for very large projects

Summary:
Here are some small fixes for issues we've encountered with very large RN projects (mostly huge dependency trees in `node_modules`).

cc amasad martinbigio
Closes https://github.com/facebook/react-native/pull/4880

Reviewed By: svcscm

Differential Revision: D2782834

Pulled By: mkonicek

fb-gh-sync-id: e316a62b84ba796b80ac819431414ebf27f7b566
This commit is contained in:
Philipp von Weitershausen 2015-12-22 15:16:46 -08:00 committed by facebook-github-bot-3
parent 869c0543d0
commit f2124b5544
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ const sane = require('sane');
const Promise = require('promise');
const exec = require('child_process').exec;
const MAX_WAIT_TIME = 25000;
const MAX_WAIT_TIME = 120000;
// TODO(amasad): can we use watchman version command instead?
const detectingWatcherClass = new Promise(function(resolve) {

View File

@ -293,11 +293,11 @@ class File {
}
getFiles() {
const files = [];
let files = [];
Object.keys(this.children).forEach(key => {
const file = this.children[key];
if (file.isDir) {
files.push(...file.getFiles());
files = files.concat(file.getFiles());
} else {
files.push(file);
}