Skip to content

react-native-folks/bootstrapper-react-native

Repository files navigation

React Native Bootstrapper

Prerequisites

Description

This codebase is meant to be used to kickoff react native projects. The following optional features can be added out of the box to the new projects:

  • Login and SignUp
  • Onboarding
  • Tabs
  • Drawer
  • Social Login Buttons
  • Google Maps
  • Firebase Crashlytics, Analytics and Performance
  • Firebase Push Notification

You can exclude Android or iOS platform setup and dependencies instalation. Keep in mind that the project will be created for both platforms anyway, but the excluded will not compile. After prject generation, you can remove the excluded platform project folder if you want.

Boilerplate

The boilerplate includes

Tech Stack

Tooling

Kick off manually

For kick off your own project using the template generator script you'll need to follow these steps:

  1. Run yarn install.
  2. run yo rootPath/generators/app/index.js you'll need Yeoman installed for this. Also, the argument -v can be used for logging.
  3. Some prompts will pop up on your terminal. Pick whatever configuration works best for your current proyect.
  4. After the script is finished, your project folder will be successfully generated with all the necessary yarn dependencies installed. Do cd you/project/path.
  5. Start bundler using yarn start.
  6. Run npx react-native run-ios --scheme develop or yarn ios for iOS and npx react-native run-android --variant=developDebug or yarn android for Android. Also check the provided scripts on package.json
  7. Start working on your project!

Testing

React Native Bootstrapper include test using jest tools.

To run the test just call yarn jest on root folder.

Test includes:

  • A selection of feature combination cases
  • App creation check for each case
  • App build check (after create) for each case
  • App jest execution inside each created project for each case
  • App Detox (e2e) execution inside each created project

Notes about testing

Testing generator is really expensive so run all tests maybe can take a long time and consume CPU resources. Some tests are defined to run concurrently at the same time in order to reduce the run time, for example, generate projects or run self-project tests. By default, jest use 5 nodes to run those test concurrently. If you are facing performance issues, you can set another lower value to set the nodes amount using the --maxConcurrency=<num> parameter. Example:

yarn test --maxConcurrency=2

By default, 'ios' platform is excluded from testing. By the way, you can tell jest program to run on both, android or iOS platform with the following argument param

yarn test -u -skip="android"

Skip options: "android" | "ios" | "none" Where 'none' will no skip and generate/test on both platforms.

For Detox execution, an existing simulator device is needed. By default, the name is Pixel_2_API_30. If you want to run Detox test you maybe need to edit your android emulator name, create one with the pointed name or modify the avdName param over `generators

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published