Summary:
This PR fixes#10784 by adding a `--help` and a `-h` option to `react-native-cli`.
**Test plan:**
Publish to sinopia and then outside of `react-native` project:
```
$ react-native --help #same goes for -h
Usage: react-native [command] [options]
Commands:
init <ProjectName> [options] generates a new project and installs its dependencies
Options:
-h, --help output usage information
-v, --version output the version number
```
```
$ react-native
You did not pass any commands, run `react-native --help` to see a list of all available commands.
```
**Notes:**
- There is no real consistency in the UX for `react-native-cli` and `local-cli` and even is no real consistency between the UI of `react-native [command] --help` and `react-native --help` in `local-cli` either. I tried to resemble the UX of `react-native --help` as close as possible since it's kind of the nearest neighbour.
- This *doesn't* add support for `react-native init --help` in `react-na
Closes https://github.com/facebook/react-native/pull/10828
Differential Revision: D4168266
Pulled By: hramos
fbshipit-source-id: 079917622bf5b22a3cd6414f13865c1b9c01da01
Summary:
Turns out I published 1.1.0 previously by accident and unpublished /ducks
Closes https://github.com/facebook/react-native/pull/10684
Differential Revision: D4111999
Pulled By: bestander
fbshipit-source-id: a85c8db6e7f48c9e96a649f017d82cbef44c73ae
Summary:
I, like many before me, had to Google why react-native init appeared to hang the first time I tried it.
It turns out it can just take a really long time, but does not give any warning of this fact.
This patch provides such a warning.
Closes https://github.com/facebook/react-native/pull/9406
Differential Revision: D3716357
Pulled By: bestander
fbshipit-source-id: 6a460c881a20b9edb1bd1c8c5df09e5a7e5020ed
Summary:
React@15.1.0 is incompatible with React-Native@0.26.
This PR was cherry-picked to 0.26-stable branch now.
What this change does:
- react-native-cli (major release bump) saves exact versions of react-native and react (only in npm2) dependencies into package.json
- local-cli saves exact version of react (only npm3) dependency into package.json
Closes https://github.com/facebook/react-native/pull/7879
Differential Revision: D3384705
Pulled By: davidaurelio
fbshipit-source-id: d4dff418f9659bd083ae8826433a4e7c0355d03b
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
(You can skip this if you're fixing a typo or adding an app to the Showcase.)
Kevin: This isn't quite a typo, but it's a change to an error message.
In my experience, frequently when this error message is displayed, the command is unrecognized because I haven't run npm install, I just checked out a repo of someone else's. We could just update this error message a bit, and I think it would improve the developer experience.
Closes https://github.com/facebook/react-native/pull/7859
Differential Revision: D3379234
fbshipit-source-id: 4fb6e5bae20904871c9c4f7504013dc18b1fe707
Summary:Simply installing `sinopia` does not create a config file (or even a
directory when it should be placed). Running `sinopia` for the first time
generates a default config file so it?s easier for the user to
configure it properly.
Closes https://github.com/facebook/react-native/pull/7146
Differential Revision: D3212613
Pulled By: mkonicek
fb-gh-sync-id: e1a2bbd8311a93b4d8a230902dd8031c85a205c3
fbshipit-source-id: e1a2bbd8311a93b4d8a230902dd8031c85a205c3
It caused problems on Windows unfortunately and when we tried to
fix it we got: https://github.com/facebook/react-native/issues/5159
Reverting to unblock people. In the future we'll do careful rc
releases of the CLI. We should try to make the change again without
breaking anyone, regardless of OS (OSX, Linux, Windows) or npm version.
To release a new version with the fix for Windows:
https://github.com/facebook/react-native/pull/5171
Thanks a lot @tdzl2003!
Tweaked the platform check to use `process.platform`
as that's more common in the codebase. No strong preference,
just for consistency.
`npm install` prints a lot of junk like gyp warnings
and the rest of the output is not super useful for
tracking progress.
Supress the output by default, show the output with
--debug, and show verbose output with --verbose.
We get a bunch of bugs because people are running old versions of Node that don't support modern JS. We have "engines" entries in the package.json files to catch this earlier but printing an explicit error message will also make this clear.
Test Plan: Changed react-native's package.json to require Node >= 5 and got an error message when running the CLI with Node 4.
React Native's packager now relies on modern V8 so it depends on modern Node. The CLI tools actually run with older versions of Node but the version constraint in the CLI's package.json accomplishes two things:
- Lets us rely on modern V8 in the CLI so we don't have to think about which JS features we can use
- Fails faster up front. So if someone has Node 0.10 for example they will get an error when setting up the CLI tools instead of later on in the process.
The readme is basically empty but contributing has a ton of useful information. Github's interface show everything in readme inline when you open the folder, so might as well make this information more visible.
This is an early release and there are several things that are known
not to work if you're porting your iOS app to Android.
See the Known Issues guide on the website.
We will work with the community to reach platform parity with iOS.