1.2.4 • Published 6 months ago

mayo-boot v1.2.4

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

mayo-boot

A simple CLI tool to seamlessly start your React Native app with different environment configurations. It will handle your environment settings and decide whether to run the app on iOS or Android based on your operating system or the platform argument provided.

Installation

You can run it directly using npx:

npx mayo-boot [environmentName] [platform]

Requirements

This tool assumes you're using react-native-config in your React Native project. If not, install it first:

yarn add @react-native-community/cli

Ensure you have followed the setup guide of react-native-config for iOS and Android.

Setting Up Environment Configuration

To use different environments, you should structure your configuration files in the following naming convention:

.env.{environmentName}

For example:

__.env.local__
__.env.staging__
__.env.production__

Inside each file, define your environment-specific variables:

API_URL=https://api.local.example.com
ANOTHER_CONFIG=SomeValue

Usage

Navigate to your React Native project directory and run:

mayo-boot [environmentName] [platform]

For example:

To start the local environment for the default platform based on OS:

mayo-boot

To specify both an environment and a platform:

mayo-boot staging android

The command above will utilize the .env.local file for environment configurations and then launch the appropriate version of the app on the specified platform (iOS or Android).

Note

The tool will, by default, use the .env.local configuration if no environment name is provided. Ensure that you have, at the very least, a .env.local file in your project.

Issues & Contributions

If you encounter any issues or would like to contribute to this tool, please open an issue or a pull request.

1.2.4

6 months ago

1.2.3

6 months ago

1.2.2

6 months ago

1.2.1

6 months ago

1.2.0

6 months ago

1.1.2

6 months ago

1.1.1

6 months ago

1.0.22

6 months ago

1.0.21

6 months ago

1.0.20

6 months ago

1.0.19

6 months ago

1.0.18

6 months ago

1.0.17

6 months ago

1.0.16

6 months ago

1.0.14

6 months ago

1.0.13

6 months ago

1.0.12

6 months ago