nnnnnoel / cli

React Native command line tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Native CLI

Command line tools to interact with React Native projects.

Build Status Version MIT License PRs Welcome

Note: CLI has been extracted from core react-native as a part of "Lean Core" effort. Please read this blog post for more details.

Compatibility

This CLI is intended to be used with a certain version of React Native. You'll find the support table with compatible versions below.

CLI React Native
^2.0.0 ^0.60.0
^1.0.0 ^0.59.0

Documentation

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:

We know it's confusing, but we're actively working to make this indirection gone.

Creating a new React Native project

There are two ways to start a React Native project.

Using npx

Available since react-native@0.60

This method is preferred if you don't want to install global packages.

npx react-native init MyApp

Using global CLI

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.

You can find out more about init command from the documentation

Usage in an 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.

About

React Native command line tools

License:MIT License


Languages

Language:JavaScript 75.2%Language:HTML 22.9%Language:Ruby 1.4%Language:Java 0.2%Language:Kotlin 0.1%Language:Objective-C 0.1%Language:Shell 0.0%