forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 151
Fix react-native-macos-init to not break react-native-windows-init #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
685f103
Update scripts to publish react-native-macos-init
tom-un 8ccd26c
Merge remote-tracking branch 'ms/master'
tom-un 45d2ee2
Merge remote-tracking branch 'ms/master'
tom-un 1e2c329
Clean up merge markers
tom-un 408dae3
Merge remote-tracking branch 'ms/master'
tom-un bdaa8ad
Merge remote-tracking branch 'ms/master'
tom-un 5a67ae0
Restored ios:macos RNTester parity except for InputAccessoryView.
tom-un e5a6df2
Revert "Restored ios:macos RNTester parity except for InputAccessoryV…
tom-un 4bca23c
Merge remote-tracking branch 'ms/master'
tom-un d067629
Merge remote-tracking branch 'ms/master'
tom-un 70a5ee3
Make react-native.config.js be appended to existing file.
tom-un File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
Make react-native.config.js be appended to existing file.
- Loading branch information
commit 70a5ee3a2abc213366afabb45d0c98fe8e5d66e1
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
24 changes: 0 additions & 24 deletions
24
local-cli/generator-macos/templates/react-native.config.js
This file contains hidden or 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 |
|---|---|---|
| @@ -1,33 +1,9 @@ | ||
| /** | ||
| * This cli config is needed for the coexistance of react-native and other | ||
| * out-of-tree implementations such react-native-macos. | ||
| * The following issue is tracked by | ||
| * https://github.com/react-native-community/discussions-and-proposals/issues/182 | ||
| * | ||
| * The work-around involves having a metro.config.js for each out-of-tree | ||
| * platform, i.e. metro.config.js for react-native and | ||
| * metro.config.macos.js for react-native-macos. | ||
| * This react-native.config.js looks for a --use-react-native-macos | ||
| * switch and when present pushes --config=metro.config.macos.js | ||
| * and specifies reactNativePath: 'node_modules/react-native-macos'. | ||
| * The metro.config.js has to blacklist 'node_modules/react-native-macos', | ||
| * and conversely metro.config.macos.js has to blacklist 'node_modules/react-native'. | ||
| */ | ||
| 'use strict'; | ||
|
|
||
| const macSwitch = '--use-react-native-macos'; | ||
| const windowsSwitch = '--use-react-native-windows'; | ||
|
|
||
| if (process.argv.includes(macSwitch)) { | ||
| process.argv = process.argv.filter(arg => arg !== macSwitch); | ||
| process.argv.push('--config=metro.config.macos.js'); | ||
| module.exports = { | ||
| reactNativePath: 'node_modules/react-native-macos', | ||
| }; | ||
| } else if (process.argv.includes(windowsSwitch)) { | ||
| process.argv = process.argv.filter(arg => arg !== windowsSwitch); | ||
| process.argv.push('--config=metro.config.windows.js'); | ||
| module.exports = { | ||
| reactNativePath: 'node_modules/react-native-windows', | ||
| }; | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.