-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow project-specific config for RN CLI using providesModuleNodeModules
Reviewed By: davidaurelio Differential Revision: D4409046 fbshipit-source-id: 5af0d08542935a784f4737653ccac49fd7517aff
- Loading branch information
1 parent
09801aa
commit 09a83f9
Showing
7 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,6 +101,16 @@ module.exports = { | |
description: 'Specify any additional platforms to be used by the packager', | ||
parse: (val) => val.split(','), | ||
default: (config) => config.getPlatforms(), | ||
}, { | ||
command: '--providesModuleNodeModules [list]', | ||
description: 'Specify any npm packages that import dependencies with providesModule', | ||
parse: (val) => val.split(','), | ||
default: (config) => { | ||
if (typeof config.getProvidesModuleNodeModules === 'function') { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
andrewimm
Author
Contributor
|
||
return config.getProvidesModuleNodeModules(); | ||
} | ||
return null; | ||
}, | ||
}, { | ||
command: '--skipflow', | ||
description: 'Disable flow checks' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When this cannot be a function? Shouldn't default value be used here:
instead of passing null?