Fix initializing packager logging

Reviewed By: cpojer

Differential Revision: D6359527

fbshipit-source-id: 0741955ca0efd6d5735637407e1bc140f04c3bbf
This commit is contained in:
Rafael Oleza 2017-11-18 16:53:44 -08:00 committed by Facebook Github Bot
parent 6d756334a8
commit eb1ddfdcd9
1 changed files with 7 additions and 5 deletions

View File

@ -122,15 +122,17 @@ class DependencyGraph extends EventEmitter {
} }
static async load(opts: Options): Promise<DependencyGraph> { static async load(opts: Options): Promise<DependencyGraph> {
const initializingMetroLogEntry = log(
createActionStartEntry('Initializing Metro'),
);
opts.reporter.update({type: 'dep_graph_loading'}); opts.reporter.update({type: 'dep_graph_loading'});
const haste = DependencyGraph._createHaste(opts); const haste = DependencyGraph._createHaste(opts);
const {hasteFS, moduleMap} = await haste.build(); const {hasteFS, moduleMap} = await haste.build();
log(
createActionEndEntry( log(createActionEndEntry(initializingMetroLogEntry));
log(createActionStartEntry('Initializing Metro Bundler')),
),
);
opts.reporter.update({type: 'dep_graph_loaded'}); opts.reporter.update({type: 'dep_graph_loaded'});
return new DependencyGraph({ return new DependencyGraph({
haste, haste,
initialHasteFS: hasteFS, initialHasteFS: hasteFS,