0.0.26 • Published 5 years ago

test-rn-utils v0.0.26

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

React native utils

npm.io npm.io npm.io npm.io

This is package with useful bash scripts for React-Native developers. It will eliminate the need of cheatsheet with different scripts for any actions with a project from terminal. Also it will simplify some usual activities with a project.

Table of Contents

Installation

npm install -g rn-bash-utils

After installation you should relaunch your terminal to enable autocompletion.


Usage

From ROOT of the React-Native project you can run all scripts.

# Platform specific script
# <name_of_the_tool> <platform OR name_of_general_script> <name_of_platform_specific_script>
rn-utils android reverse

# General script
# <name_of_the_tool> <name_of_general_script>
rn-utils clear

General scripts

clear

rn-utils clear
  • Clear watchman watches;
  • Delete the node_modules folder;
  • npm/yarn install node_modules (depends on lock file);
  • Install pods if need;
  • Reset Metro Bundler cache;
  • Remove haste cache.

iOS

remove-derived-data

rn-utils ios remove-derived-data

Removing Derived data folder.


Android

reverse

rn-utils android reverse

Calls the method adb -s <device> reverse tcp:<port> tcp:<port>. It allow to choose one of devices attached and enter port.

Links:

  1. React Native: Connecting to the development server

assemble-release

rn-utils android assemble-release
  • Remove android/build and android/app/build folders;
  • Calls the method android/gradlew assembleRelease;
  • Copy apk to root of the project (file app-release.apk).

install-apk-release

rn-utils android install-apk-release

Calls the method adb install with file android/app/build/outputs/apk/release/app-release.apk (Generated after gradlew assembleRelease).


bundle-release

rn-utils android bundle-release
  • Remove android/build and android/app/build folders;
  • Calls the method android/gradlew bundleRelease;
  • Copy bundle (.aab) to root of the project (file app.aab).

install-bundle-release

rn-utils android install-bundle-release

It uses values from gradle.properties for signing.

  • Calls the method bundletool build-apks
  • Generated .apks file is ./release_signed.apks
  • Install apk on device with bundletool install-apks

Author

Vitalii Obideiko, Mobile developer. npm.io npm.io npm.io

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago