Allow project-specific config for RN CLI using providesModuleNodeModules

Reviewed By: davidaurelio

Differential Revision: D4409046

fbshipit-source-id: 5af0d08542935a784f4737653ccac49fd7517aff
This commit is contained in:
Andrew Imm 2017-01-12 21:03:57 -08:00 committed by Facebook Github Bot
parent ae6cd177de
commit 66714e45da
3 changed files with 7 additions and 1 deletions

View File

@ -74,6 +74,7 @@ type Options = {
platforms: Array<string>,
polyfillModuleNames: Array<string>,
projectRoots: Array<string>,
providesModuleNodeModules?: Array<string>,
reporter: Reporter,
resetCache: boolean,
transformModulePath?: string,
@ -154,6 +155,7 @@ class Bundler {
platforms: opts.platforms,
polyfillModuleNames: opts.polyfillModuleNames,
projectRoots: opts.projectRoots,
providesModuleNodeModules: opts.providesModuleNodeModules,
reporter: opts.reporter,
resetCache: opts.resetCache,
transformCacheKey,

View File

@ -36,6 +36,7 @@ type Options = {
platforms: Array<string>,
polyfillModuleNames?: Array<string>,
projectRoots: Array<string>,
providesModuleNodeModules?: Array<string>,
reporter: Reporter,
resetCache: boolean,
transformCacheKey: string,
@ -65,7 +66,7 @@ class Resolver {
},
platforms: opts.platforms,
preferNativePlatform: true,
providesModuleNodeModules: defaults.providesModuleNodeModules,
providesModuleNodeModules: opts.providesModuleNodeModules || defaults.providesModuleNodeModules,
reporter: opts.reporter,
resetCache: opts.resetCache,
roots: opts.projectRoots,

View File

@ -63,6 +63,7 @@ type Options = {
platforms?: Array<string>,
polyfillModuleNames?: Array<string>,
projectRoots: Array<string>,
providesModuleNodeModules?: Array<string>,
reporter: Reporter,
resetCache?: boolean,
silent?: boolean,
@ -178,6 +179,7 @@ class Server {
platforms: Array<string>,
polyfillModuleNames: Array<string>,
projectRoots: Array<string>,
providesModuleNodeModules?: Array<string>,
reporter: Reporter,
resetCache: boolean,
silent: boolean,
@ -209,6 +211,7 @@ class Server {
platforms: options.platforms || defaults.platforms,
polyfillModuleNames: options.polyfillModuleNames || [],
projectRoots: options.projectRoots,
providesModuleNodeModules: options.providesModuleNodeModules,
reporter: options.reporter,
resetCache: options.resetCache || false,
silent: options.silent || false,