-
Notifications
You must be signed in to change notification settings - Fork 935
adding projectRoot to options and resolve it #588
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
adding projectRoot to options and resolve it #588
Conversation
thymikee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add it to the documentation as well: https://github.com/react-native-community/cli/blob/master/docs/commands.md#start
|
done |
* origin/master: imp: optimize gradle code generation (#603) v2.8.2 fix: corrects `srcDirs` to be compatible with Kotlin projects (#602) v2.8.1 fix: fallback to default terminal if wrong one passed (#601) fix: adding back `projectRoot` to option (#588) fix: init run instructions to show workspace (#566)
|
|
||
| Specify port to listen on | ||
|
|
||
| #### `--projectRoot [list]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't actually a list is it? looks like it's just forwarded to path.resolve() which doesn't take a list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, it's a string. Mind sending a PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary:
Following my PR from yesterday #572 , I forgot to include the --projectRoot option descriptor in the PR, which makes it non usable or documented in --help. This PR fixes it.
i also went ahead and added path.resolve to the parsing of it, and of --watchFolders.
Test Plan:
try using the cli start with custom project root set in metro config, it should load from the custom root. try using the cli start with --projectRoot that point to another directory (you can also check for relative path), it should override the metro config. try using the cli with a --watchFolders with relative paths, the folders you specified should be resolved and merged to those in the metro config.