UNPKG

airborne-cli-react-native

Version:
75 lines (56 loc) 2.16 kB
# README.md ## Project Overview Airborne CLI is a React Native build tool that generates custom bundle configurations for Android and iOS platforms. It creates release configuration JSON file with bundling information, file paths, and timeout settings. ## Configuration ### airborne-config.json Format ```json { "config_timeout": "1000", "boot_timeout": "2000", "namespace": "your-namespace", "js_entry_file": "index.js", "android": { "index_file_path": "index.android.bundle" }, "ios": { "index_file_path": "main.jsbundle" } } ``` ### Mandatory Configuration Values - `config_timeout` - Configuration timeout in milliseconds - `boot_timeout` - Boot timeout in milliseconds - `namespace` - Package namespace identifier ### Optional Configuration - `js_entry_file` - Entry file of the react. Defaults to "index.js". - `index_file_path` - Platform-specific index file paths for android and iOS. Defaults to `index.android.bundle` and `main.jsbundle` respectively. ## Commands ### Development Commands - `build-airborne <platform>` - Main command to build for android or ios ### CLI Usage ```bash # Build for Android npx build-airborne android # Build for iOS npx build-airborne ios ``` ## Architecture ### Core Components **Main Entry Point** (`bin/index.js`): - CLI argument parsing using Commander.js - Interactive prompts for configuration values - Platform-specific build logic orchestration ### Default Output Locations of release_config - **Android**: `android/app/src/main/assets/{namespace}/release_config.json` - **iOS**: `ios/{namespace}.bundle/release_config.json` If you want the release_config to be generated in any other path yo can specify the path shown below. ```bash npx build-airborne <platform> --output custom-output.json ``` ## Build Output The tool creates platform-specific build directories: - `android/build/generated/airborne/` - Android build artifacts - `ios/build/generated/airborne/` - iOS build artifacts These contain the React Native bundle and assets generated by the `react-native bundle` command. ## Release Commands - `npm run release` - Create a new release using release-it