npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

no-npx-rn-cli

v1.0.0

Published

Command line tools that ship with [`react-native`](https://github.com/facebook/react-native) in form of the `@react-native-community/cli` package.

Downloads

5

Readme

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 | | ---------------------------------------------------------------- | ---------------- | | ^4.0.0 (next) | ^0.63.0 | | ^3.0.0 | ^0.61.0, ^0.62.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

Using global CLI (legacy)

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:
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

Because we release independently of react-native, it happens that you may be locked on a version without fixes for bugs that affect you. Here's how to get it sorted:

  1. If you use lock files (yarn.lock or package-lock.json) - find the @react-native-community/cli entry, remove it, run yarn install / npm install once again.
  2. If you don't use lock files – remove node_modules and run yarn install / npm install again.
  3. Run yarn list @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.