Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-cross-platform-cli

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cross-platform-cli

Command line interface to create a boilerplate for a cross platform react application.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

react-cross-platform-cli

This project servers as a simple command line interface. One can use it to generate a boilerplate project for a cross platform react application.

Included platforms

The following platforms are supported in the boilerplate application:

  • Android (using react-native)
  • iOS (using react-native)
  • Web / Browser (using react-native-web)
  • Desktop Application (using electron)

Installation

Install the CLI globally on your machine using npm:

npm install -g react-cross-platform-cli

The CLI uses yarn as package manager. You can either install yarn manually or let the CLI do this for you. (In the future this CLI shall also work using native npm instead of yarn.)

Usage

To run the CLI simply type

react-cross-platform-cli init

The CLI will ask you for a project name and the platforms you want to use. (Android and iOS are always default, Web and Desktop are optinal.)

The CLI then creates a new folder in your working directory with the boilerplate application.

After that you have multiple options for running your application from the command line, each depending on the device:

  • npm run andoid: Runs the application on a virtual Android device. For setup instructions look here.
  • npm run ios: Runs the application on a virtual iPhone. For setup instructions look here.
  • npm run web: Runs webpack-dev-server on port 3000. You can look at your application via http://localhost:3000. You have also extended options here, look them up here.
  • npm run desktop: Runs the application in a new window on your desktop.

The single source of truth for all devices is the App-Component located in app.js. Simply use this as your main component and import all custom components there, then you never should have to actually touch any of the platform-specific files.

Credits

Keywords

FAQs

Package last updated on 25 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc