Summary: --------- Attempt No. 2 after https://github.com/react-native-community/react-native-cli/pull/178. Turned out I passed empty array as `platforms` argument to link, while I should pass `undefined`. We could actually add `--platforms` support to `install`/`uninstall` now, what do you think? Test Plan: ---------- Uninstalling: <img width="677" alt="screenshot 2019-02-19 at 13 42 54" src="https://user-images.githubusercontent.com/5106466/53015940-8ed51980-344c-11e9-9f22-0406c468a10d.png"> Installing: <img width="668" alt="screenshot 2019-02-19 at 13 43 02" src="https://user-images.githubusercontent.com/5106466/53015941-8ed51980-344c-11e9-8556-a6350f05536f.png">
2.5 KiB
React Native CLI
Command Line Interface for React Native.
Note: CLI has been extracted from core react-native as a part of "Lean Core" effort. Please read this blog post for more details.
About
This repository contains tools and helpers for React Native projects in form of a CLI. We want to make a couple of things clear for you first:
- this is a monorepo;
- there are currently two CLIs: the actual one called
@react-native-community/clithat does all the job and globalreact-native-cliwhich is used as its proxy;
We know it's confusing, but we're actively working to make this indirection gone.
Creating a new React Native project
To start a new React Native project, you'll need to install a global module react-native-cli and follow instructions there.
We strongly encourage you to only use global react-native-cli for bootstrapping new projects. Use local version for everything else.
Usage in existing React Native project
Once you're inside an existing project, a local react-native binary will be available for you to use. Feel free to use Yarn to call it directly.
Example running start command in terminal:
yarn react-native start
# or if you don't use Yarn:
node ./node_modules/.bin/react-native start
You can also add npm scripts to call it with whichever package manager you use:
{
"scripts": {
"start": "react-native start"
}
}
License
Everything inside this repository is MIT licensed.