Expose minify param to the buildGraph method

Summary: Now that the minifier is integrated inside the transformer, we can expose the param in the `buildGraph` method

Reviewed By: davidaurelio

Differential Revision: D7707542

fbshipit-source-id: 0125172b2ac90c7ceb477d5c55e9aea3c3867e02
This commit is contained in:
Rafael Oleza 2018-04-20 09:17:40 -07:00 committed by Facebook Github Bot
parent a6b61554ec
commit 3adbf01ea2
1 changed files with 3 additions and 0 deletions

View File

@ -270,6 +270,7 @@ type BuildGraphOptions = {|
...PublicMetroOptions, ...PublicMetroOptions,
entries: $ReadOnlyArray<string>, entries: $ReadOnlyArray<string>,
dev?: boolean, dev?: boolean,
minify?: boolean,
onProgress?: (transformedFileCount: number, totalFileCount: number) => void, onProgress?: (transformedFileCount: number, totalFileCount: number) => void,
platform?: string, platform?: string,
type: 'module' | 'script', type: 'module' | 'script',
@ -370,6 +371,7 @@ exports.buildGraph = async function({
config, config,
dev = false, dev = false,
entries, entries,
minify = false,
onProgress, onProgress,
platform = `web`, platform = `web`,
type = 'module', type = 'module',
@ -384,6 +386,7 @@ exports.buildGraph = async function({
return await metroServer.buildGraph(entries, { return await metroServer.buildGraph(entries, {
...MetroServer.DEFAULT_GRAPH_OPTIONS, ...MetroServer.DEFAULT_GRAPH_OPTIONS,
dev, dev,
minify,
onProgress, onProgress,
platform, platform,
type, type,