5.0.0 • Published 3 years ago

@rebox/native-utils v5.0.0

Weekly downloads
165
License
MIT
Repository
github
Last release
3 years ago

@rebox/native-utils npm

Set of common helpers to deal with React Native on iOS and Android.

Install

$ yarn add @rebox/native-utils

API

type TBuildJsBundleOptions = {
  entryPointPath: string,
  outputPath: string,
  platform: 'ios' | 'android'
}

const buildNativeJsBundle: (options: TBuildJsBundleOptions) => Promise<string>
type TServeNativeJsBundleOptions = {
  entryPointPath: string,
  port: number,
  platform: 'ios' | 'android',
  isDev?: boolean, // `&dev=`, true by default
  shouldMinify?: boolean // `&minify=`, false by default
}

const serveNativeJsBundle: (options: TServeNativeJsBundleOptions) => Promise<() => void>
type TCopyNativeTemplateOptions = {
  projectPath: string,
  platform: 'ios' | 'android'
}

const copyNativeTemplate: (options: TCopyNativeTemplateOptions) => Promise<void>