react-native/local-cli
Eric Vicenti bc74dd1e14 Eject CLI command to re-create native folders
Summary:
The iOS and Android native folders of a React Native app can be difficult to maintain. This introduces a new workflow for creating and maintaining the native code of your app.

Now it will be possible to:

1. Remove the native iOS or Android folders
2. Create an `app.json` for your app, with at least a `name` and `displayName`
3. Run `react-native eject`, and the native code for your app will be generated

Then, as usual, you can run `react-native run-ios` and `react-native run-android`, to build and launch your app

For apps that don't have any native code, it will be possible to ignore the `ios` and `android` folders from version control.

Eject step tested in RN app by deleting native folders.

mkonicek, what is the best way to test `react-native init`?

As follow-up items, we can enable the following:

- Configuring app icon and launch screen from the `app.json`
- Automatically run `react-native link` for native libraries
- A
Closes https://github.com/facebook/react-native/pull/12162

Differential Revision: D4509138

Pulled By: ericvicenti

fbshipit-source-id: 0ee213e68f0a3d44bfce337e3ec43e5024bacc66
2017-02-03 12:58:46 -08:00
..
__mocks__ Fix lint in local-cli 2016-11-14 11:13:42 -08:00
bundle Remove `react-packager` indirection. 2017-02-02 05:44:15 -08:00
core Remove `react-packager` indirection. 2017-02-02 05:44:15 -08:00
dependencies BREAKING: expose `getTransformOptions` directly in configuration 2016-11-28 07:28:33 -08:00
eject Eject CLI command to re-create native folders 2017-02-03 12:58:46 -08:00
generator Eject CLI command to re-create native folders 2017-02-03 12:58:46 -08:00
init CLI: Show npm / yarn output during 'react-native-init' when installing React and Jest 2016-12-06 13:58:31 -08:00
install Use Yarn for Install/Uninstall CLI if available 2017-02-02 05:13:33 -08:00
library Fix lint in local-cli 2016-11-21 10:28:34 -08:00
link Use Yarn for Install/Uninstall CLI if available 2017-02-02 05:13:33 -08:00
logAndroid Use native Promise in local-cli 2016-11-21 10:28:34 -08:00
logIOS Use native Promise in local-cli 2016-11-21 10:28:34 -08:00
runAndroid Feat/run android specify activity 2017-01-09 04:13:32 -08:00
runIOS Add no-packager option to run-android and run-ios commands 2017-01-09 03:28:29 -08:00
server Remove build artifacts 2017-02-03 06:58:35 -08:00
templates Eject CLI command to re-create native folders 2017-02-03 12:58:46 -08:00
upgrade New upgrading process, relying on Git 2016-11-28 08:28:35 -08:00
util Use Yarn for Install/Uninstall CLI if available 2017-02-02 05:13:33 -08:00
.eslintrc Support copy to clipboard on Windows 2017-01-19 16:28:39 -08:00
cli.js packager: centralize babelRegisterOnly callsites 2017-01-06 06:13:54 -08:00
cliEntry.js Merge `rnpm config` with the `cli config`, step 1 2017-01-09 07:58:33 -08:00
commands.js Eject CLI command to re-create native folders 2017-02-03 12:58:46 -08:00
setup_env.bat
setup_env.sh Change ulimit to 2048 for non root Mac users 2016-02-06 11:45:37 -08:00
wrong-react-native.js Fix usage of react-native cli inside package.json scripts 2016-04-26 15:42:35 -07:00