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.
Before:
> Command `foo` unrecognized.Did you mean to run this inside a react-native project?
After:
> Command `foo` unrecognized. Did you mean to run this inside a react-native project?
A cli package that is responsible for:
* starting a new react-native project
* forwarding all other commands to a cli module in react-native
* currently cli.js knows how to start the webserver, in the future it may do things like build the app etc.