Summary:
- Added an option to override the install command in CI environments (see comment in code)
- Simplify the verbose mode
- Simplify how options are passed round
Test plan (only tested on Mac OS):
react-native init TestApp
react-native init TestApp --version 0.36
In both cases the app was generated, package.json contained the correct version (latest, or 0.36).
react-native init TestApp --verbose
Saw progress bar.
react-native init InstallCommandTest --installCommand "npm install bad-package-doesnt-exist"
404 error is printed to stdout correctly.
react-native init TestApp --installCommand "npm install react-native"
The app was generated.
react-native init InstallCommandTest --installCommand "npm install react-native --verbose" --verbose
Saw verbose output from npm.
Reviewed By: bestander
Differential Revision: D4284642
fbshipit-source-id: f2cdee52ab64831ae3ca064d50f23c5f73a0301f
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:
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
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.
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.
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.