Electrode Native
v0.21
v0.21
  • Introduction
  • INTRODUCTION
    • Overview
      • What is Electrode Native
      • Why use Electrode Native
      • What is a MiniApp
      • Electrode Native workflow
      • Native dependencies management
      • JS/Native communication
      • Requirements
      • Upgrading Electrode Native
      • Contributing
  • QUICK START
    • Building a Movie application
  • REFERENCE
    • Container
      • What's inside
      • Publication
      • Integration
      • Initialization
      • Launching MiniApps
    • Cauldron
      • Structure
      • Setup
      • Compatibility checks
      • Guidelines
    • Manifest
      • Override
      • Native Modules
      • Configurable Modules
    • Runner
    • APIs
      • Project Generation
      • Implementation
      • Versioning
      • Guidelines
    • Bridge
      • Message Types
      • Communication
      • Leveraging APIs
    • CLI
      • Global CLI
      • Local CLI
    • GLOSSARY
  • CLI COMMANDS
    • add
    • binarystore
      • add
      • get
      • remove
    • code-push
      • patch
      • release
      • promote
    • compat-check
    • create-api-impl
    • create-api
    • create-container
    • publish-container
    • transform-container
    • create-miniapp
    • link
    • regen-api
    • regen-api-impl
    • run-android
    • run-ios
    • start
    • unlink
    • upgrade-miniapp
    • why
    • cauldron add
      • dependencies
      • jsapiimpls
      • miniapps
      • nativeapp
      • publisher
    • cauldron del
      • dependencies
      • jsapiimpls
      • miniapps
      • nativeapp
    • cauldron get
      • config
      • dependency
      • nativeapp
    • cauldron repo
      • add
      • clear
      • current
      • list
      • remove
      • use
    • cauldron update
      • dependencies
      • jsapiimpls
      • miniapps
      • nativeapp
    • cauldron batch
    • cauldron regen-container
    • cauldron upgrade
    • platform
      • plugins
        • list
        • search
      • config
      • current
      • install
      • list
      • uninstall
      • use
Powered by GitBook
On this page
  • Description
  • Syntax
  • Examples
  • Remarks
  1. CLI COMMANDS

create-miniapp

Description

  • Create a new MiniApp in a new directory named after the MiniApp.

The generated MiniApp is a starter HelloWorld MiniApp that you can use to launch a standalone MiniApp on the iOS or Android platforms in our Runner—using the ern run-ios and ern run-android commands.

If you used react-native previously, you'll notice that the generated JavaScript react-native MiniApp is exactly the same react-native starter app as the one provided by react-native. A MiniApp is simply a react-native application. One of the differences with react-native is that we generate our own native projects which use a locally-generated ern container.

iOS and Android directories are not generated by this command. To generate those directories, run the ern run-ios or ern run-android commands.

Syntax

ern create-miniapp <appName>

Arguments

<appName>

  • The name to use for the MiniApp. The MiniApp name must follow Electrode Native module name rules.

  • We recommend suffixing the name of MiniApp with suffix App

Options

--scope/-s <scope>

  • Specify the NPM package scope to use for the MiniApp.

  • Add the package scope automatically in the package.json of the generated MiniApp.

  • Default Package will be unscoped.

--packageName/-p <name>

  • Specify the NPM package name to use for the MiniApp.

  • Add the package name automatically in the package.json of the generated MiniApp.

  • Default The command will prompt for the package name to use.

--platformVersion/-v <version>

  • Specify a platform version if different from the currently activated version.

  • This option is rarely used.

  • Default Will use the currently activated platform version.

--skipNpmCheck

  • Skip the check ensuring package does not already exists in NPM registry.

  • Default The value defaults to false.

Examples

ern create-miniapp MyAwesomeApp

Creates a MiniApp named MyAwesomeApp.

ern create-miniapp MyAwesomeApp --scope MyCompany

Creates a MiniApp named MyAwesomeApp and use MyCompany as the scope of the MiniApp NPM package.

ern create-miniapp MyAwesomeApp --packageName my-awesome-app

Creates a MiniApp named MyAwesomeAp and use my-awesome-app as the name of the MiniApp NPM package.

Remarks

  • MiniApp name can only consist of upper and lower case characters. No digits nor special characters can be used.

  • Package name should be a valid NPM package name.

  • This command is the ern equivalent of the react-native init command.

Previoustransform-containerNextlink

Last updated 6 years ago