← 返回命令列表

Linux command

ern 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create a new MiniApp

ern create-miniapp [app-name]

Run a MiniApp

ern run-android

Run a MiniApp

ern run-ios

Create a new API

ern create-api [api-name]

Add a dependency

ern add [dependency]

Start the development

ern start

Push an OTA update

ern code-push [miniapps] -d [descriptor]

说明

ern (Electrode React Native) is a platform for integrating React Native into existing native applications. It provides tools for building, managing, and deploying React Native "MiniApps" within native mobile apps. The platform includes a Cauldron for version management, Container generation for bundling MiniApps with native dependencies, and APIs for communication between React Native and native code. ERN enables incremental React Native adoption in existing mobile applications.

参数

create-miniapp _NAME_
Create a new MiniApp project (equivalent to react-native init).
run-android
Run MiniApp on Android emulator or device.
run-ios
Run MiniApp on iOS simulator or device.
create-api _NAME_
Create a new API with generated client code.
start
Start the Electrode Native development server (packager).
add _DEPENDENCY_
Add a JavaScript or native dependency to a MiniApp.
cauldron _COMMAND_
Manage the Cauldron (version registry for native app containers).
code-push _MINIAPPS_
Push OTA updates via CodePush.
link
Link a MiniApp for local development and debugging.
--help
Display help information.

FAQ

What is the ern command used for?

ern (Electrode React Native) is a platform for integrating React Native into existing native applications. It provides tools for building, managing, and deploying React Native "MiniApps" within native mobile apps. The platform includes a Cauldron for version management, Container generation for bundling MiniApps with native dependencies, and APIs for communication between React Native and native code. ERN enables incremental React Native adoption in existing mobile applications.

How do I run a basic ern example?

Run `ern create-miniapp [app-name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does create-miniapp _NAME_ do in ern?

Create a new MiniApp project (equivalent to react-native init).