react-native-community / Cli

Licence: mit
This repository contains tools and helpers for React Native projects in form of a command line tool. There's been quite some confusion around that since the extraction from React Native core. Let's clear them up:

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
ruby
36898 projects - #4 most used programming language
HTML
75241 projects
java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Cli

Node Developer Boilerplate
🍭 Boilerplate for ES6+ Node.js and npm Developer
Stars: ✭ 82 (-95.26%)
Mutual labels:  yarn
Molecule
⚛️ – :atom: – ⚛️ Boilerplate for cross platform web/native react apps with electron.
Stars: ✭ 95 (-94.51%)
Mutual labels:  yarn
Conf
Landing page for event React Conf Brazil
Stars: ✭ 104 (-93.99%)
Mutual labels:  yarn
Ci Yarn Upgrade
Keep NPM dependencies up-to-date with CI, providing version-to-version diff for each library
Stars: ✭ 85 (-95.09%)
Mutual labels:  yarn
Hadoop Yarn Api Python Client
Python client for Hadoop® YARN API
Stars: ✭ 91 (-94.74%)
Mutual labels:  yarn
Democracy Client
DEMOCRACY App Client
Stars: ✭ 98 (-94.34%)
Mutual labels:  yarn
Dfile
[Python + Flask] DFile: A fancy S3-based file sharing mode
Stars: ✭ 79 (-95.44%)
Mutual labels:  yarn
Tensorflowonyarn
Support TensorFlow on YARN
Stars: ✭ 114 (-93.41%)
Mutual labels:  yarn
Rocky
React Over Crystal Kemal and Yarn
Stars: ✭ 94 (-94.57%)
Mutual labels:  yarn
Hapi Starter Kit
Hapi.js based REST boilerplate which uses latest ES7/ES8 features (async/await) with code coverage and follows best pratices
Stars: ✭ 103 (-94.05%)
Mutual labels:  yarn
Cuesheet
A framework for writing Spark 2.x applications in a pretty way
Stars: ✭ 86 (-95.03%)
Mutual labels:  yarn
React Boilerplate
This project is deprecated. Please use CRA instead.
Stars: ✭ 88 (-94.92%)
Mutual labels:  yarn
Bigdata Notes
大数据入门指南 ⭐
Stars: ✭ 10,991 (+534.95%)
Mutual labels:  yarn
Flow Mono Cli
A command line interface that aims to solve a few issues while working with flow typed codebases in a mono-repo.
Stars: ✭ 84 (-95.15%)
Mutual labels:  yarn
Yarn
The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
Stars: ✭ 40,325 (+2229.58%)
Mutual labels:  yarn
Rails Webpacker
Rails on webpack and yarn with new webpacker gem. Multiple examples using react, vue and angular
Stars: ✭ 80 (-95.38%)
Mutual labels:  yarn
Lmify
Install NPM dependencies programmatically 🤙
Stars: ✭ 98 (-94.34%)
Mutual labels:  yarn
Kymsu
Keep Your macOs Stuff Updated (KYMSU)
Stars: ✭ 119 (-93.13%)
Mutual labels:  yarn
Cheatsheets
A curated list of everything I look up more than twice
Stars: ✭ 109 (-93.7%)
Mutual labels:  yarn
Wordless
All the power of Pug, Sass, Coffeescript and WebPack in your WordPress theme. Stop writing themes like it's 1998.
Stars: ✭ 1,374 (-20.62%)
Mutual labels:  yarn

React Native CLI

Command line tools that ship with react-native in form of the @react-native-community/cli package.

It exposes react-native binary, so you can call yarn react-native or npx react-native directly from your project.

Build Status Version MIT License PRs Welcome Lean Core Extracted

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

Contents

Compatibility

Our release cycle is independent of react-native. We follow semver and here is the compatibility table:

@react-native-community/cli react-native
^6.1.0 (master) ^0.66.0
^6.0.0 ^0.65.0
^5.0.0 ^0.64.0
^4.0.0 ^0.62.0
^3.0.0 ^0.61.0
^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 command line tool. There's been quite some confusion around that since the extraction from React Native core. Let's clear them up:

  • There are currently two CLIs:
  • When we say "the CLI" we mean @react-native-community/cli.
  • We update the CLI independently of React Native itself. Please see how to use the latest version.
  • This is a monorepo to keep stuff organized.

We're actively working to make any indirections gone.

Creating a new React Native project

There are two ways to start a React Native project.

Using npx (recommended)

Available since [email protected]

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

npx react-native init MyApp

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:
npx react-native start
# or
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"
  }
}

Updating the CLI

React Native CLI is a dependency of react-native, which makes it a transitive dependency of your project. It happens that you may be locked on a version without fixes for bugs that may affect you. Here's how to get it sorted:

  1. If you use lock files (yarn.lock or package-lock.json) - find all the @react-native-community/cli prefixed entries, remove them, run yarn install / npm install once again. Here's an example using yarn.lock. Notice how whole @react-native-community/cli entries are removed. Make sure to delete all of them:

    diff --git a/yarn.lock b/yarn.lock
    index 073309f..0bb8c4b 100644
    --- a/yarn.lock
    +++ b/yarn.lock
    @@ -843,26 +843,6 @@
         "@types/istanbul-reports" "^1.1.1"
         "@types/yargs" "^13.0.0"
    
    -"@react-native-community/cli-debugger-ui@^3.0.0":
    -  version "3.0.0"
    -  resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-3.0.0.tgz#d01d08d1e5ddc1633d82c7d84d48fff07bd39416"
    -  integrity sha512-m3X+iWLsK/H7/b7PpbNO33eQayR/+M26la4ZbYe1KRke5Umg4PIWsvg21O8Tw4uJcY8LA5hsP+rBi/syBkBf0g==
    -  dependencies:
    -    serve-static "^1.13.1"
    -
    -"@react-native-community/cli-platform-android@^3.0.0":
    -  version "3.1.2"
    -  resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-3.1.2.tgz#313644fba81b5d673cc803009e1eddc930b9618c"
    -  integrity sha512-H30a00LLigsTh4eO0kc2YtaIkOJKrValWOU6n2VES3ZGS31qDx9GhZIwMCMcdzcSnypAyMAfauVatEmBSQZU7Q==
    -  dependencies:
    -    "@react-native-community/cli-tools" "^3.0.0"
    -    chalk "^2.4.2"
  2. If you don't use lock files – remove node_modules and run yarn install / npm install again.

  3. Run yarn list --pattern @react-native-community/cli or npm list @react-native-community/cli and verify you're on the latest version.

After performing these steps you should be on the latest CLI version. Feel free to do it once in a while, because we release often.

Maintainers

License

Everything inside this repository is MIT licensed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].