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

@wavemaker/wm-reactnative-cli

v1.8.6

Published

A command line utility to build react native apps created using WaveMaker product.

Downloads

304

Readme

wm-reactnative-cli

A command line utility to build react native apps created using WaveMaker product.

The main goal of wm-reactnative-cli is to simplify generation of APK or IPA for WaveMaker developers. wm-reactnative-cli combines multiple react-native commands into a single command. First, one has to make sure all the required hardware and software are available and installed. Then execute the command with the appropriate values for arguments.

Command to Install

npm install -g @wavemaker/wm-reactnative-cli

Adding Environment Variable

For Windows

  • Go to System Setting and Select Environment Variables.

    Windows System settings

  • Select New Variable under the System section and add WM_REACTNATIVE_CLI and its respective path.

    CLI System Variable

For Linux/MAC

  • use nano ~/.bashrc then add the following at the end of the file (after updating the paths) and save it.
export WM_REACTNATIVE_CLI="$HOME/cli/"

NOTE: To avoid cmake errors caused due to long paths in Windows, we suggest making the cli path shorter using this variable

Android Build

Requirements

Adding Environment Variables

For Windows

  • Go to System Setting and Select Environment Variables.

    Windows System settings

  • Select New Variable under the System section and add variables and their respective paths. New System Variable

For Linux/MAC

  • use nano ~/.bashrc then add the following at the end of the file (after updating the paths) and save it.
export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"
export ANDROID_HOME="/usr/lib/android-sdk"
export ANDROID_SDK="/usr/lib/android-sdk"
export ANDROID_SDK_ROOT="/usr/lib/android-sdk"
export GRADLE_HOME="$HOME/gradle/gradle-8.2.1"

Command

wm-reactnative build android <src_dir> [additional_arguments]

|                   Argument                   | Description | |--|--| | src_dir | DEFAULT: current working directory. Path to the reactnative expo zip (or) path to the reactnative expo project folder. | |--dest|OPTIONAL: directory where the app has to be copied and built. If it is not specified then .wm-reactnative-cli folder inside the home directory, will contain the build folders | |--auto-eject|OPTIONAL: On setting this flag to true, expo eject will be invoke automatically.| |--aKeyStore|Absolute path of the key store. If keystore is not given then android debug key is used.| |--aStorePassword|Password to key store| |--aKeyAlias|Alias name of the key| |--aKeyPassword|Key Password| |--buildType|DEFAULT: developmentdevelopment or productionUse ‘production’ with keystore specified.|

Example 1

wm-reactnative build android "/path/to/src"

Example 2

wm-reactnative build android "/path/to/src" \
--dest="/path/to/dest" \
--aKeyStore="/path/to/file.keystore" \
--aStorePassword="store_password" \
--aKeyAlias="key_alias_name" \
--aKeyPassword="key" \
--buildType="production"
--auto-eject=true

IOS build

Requirements

NOTE: Before building an app, please make sure that neither iPhone nor iPad is not connected to Mac.

Command

wm-reactnative build ios <src_dir> [additional_arguments]

|                   Argument                     | Description | |--|--| | src_dir | DEFAULT: current working directory. Path to the reactnative expo zip (or) path to the reactnative expo project folder. | |--dest|OPTIONAL: directory where the app has to be copied and built. If it is not specified then .wm-reactnative-cli folder inside the home directory, will contain the build folders | |--auto-eject|OPTIONAL: On setting this flag to true, expo eject will be invoke automatically.| |--iCertificate|Absolute path of P12 certificate location| |--iCertificatePassword|Password to unlock the certificate.| |--iProvisioningFile|Absolute path of provisioning file| |--buildType|DEFAULT: developmentdevelopment or production Use ‘production’ with an AppStore distribution certificate.|

Example

wm-reactnative build ios "/path/to/src" \
--iCertificate="/path/to/distribution.p12" \
--iCertificatePassword="unlock_password" \
--iProvisioningFile="/path/to/profile.mobileprovision" \
--buildType="production"

Run web-preview

Requirements

Command

wm-reactnative run web-preview <preview_url> [additional_arguments]

|                   Argument                     | Description | |--|--| | preview_url | app preview url | |--clean|DEFAULT: false if true, existing project directory is removed |

Sync

Requirements

Command

wm-reactnative sync <preview_url> [additional_arguments]

|                   Argument                     | Description | |--|--| | preview_url | app preview url | |--clean|DEFAULT: false if true, existing project directory is removed |

After the build is complete:

  • Locate the directory where the Expo app has been generated in command logs.
  • Use the cd command to navigate to the generated Expo app directory:
cd <path-to-generated-expo-app>

Expo Preview

Start the Expo Metro bundler

npm start

React Native Preview

Eject the Expo app to a React Native app by executing the below command (generate android and ios folders)

npx expo prebuild

Start the React Native Metro bundler

npx react-native start

Build and run the app on an Android device/emulator

npx react-native run-android

Build and run the app on an iOS device/simulator

npx react-native run-ios

Run Expo (Deprecated)

Run Android (Deprecated)

Run iOS (Deprecated)

Additional Information

  1. Destination folder path is logged at the start of the build.
  2. Build log files are present at <destination_folder>/output/logs
  3. The artifact built is available at <destination_folder>/output/<platform_type>/. The complete path is printed in log also.