How to use the ern-container-gen.generateMiniAppsComposite function in ern-container-gen

To help you get started, we’ve selected a few ern-container-gen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electrode-io / electrode-native / ern-local-cli / src / lib / publication.js View on Github external
// If force or skipFinalConfirmation was not provided as option, we ask user for confirmation before proceeding
    // with code-push publication
    const userConfirmedCodePushPublication = force || skipConfirmation || await askUserToConfirmCodePushPublication(miniAppsToBeCodePushed, jsApiImplsToBeCodePushed)

    if (!userConfirmedCodePushPublication) {
      return'CodePush publication aborted')
    } else {'Getting things ready for CodePush publication')

    const pathsToMiniAppsToBeCodePushed =, m => PackagePath.fromString(m.toString()))
    const pathToJsApiImplsToBeCodePushed =, j => PackagePath.fromString(j.toString()))

    await spin('Generating composite module',
       generateMiniAppsComposite(pathsToMiniAppsToBeCodePushed, tmpWorkingDir, {pathToYarnLock}, pathToJsApiImplsToBeCodePushed))

    const bundleOutputDirectory = path.join(tmpWorkingDir, 'bundleOut')
    shell.mkdir('-p', bundleOutputDirectory)
    const platform = napDescriptor.platform || ''
    const bundleOutputPath = platform === 'android'
      ? path.join(bundleOutputDirectory, '')
      : path.join(bundleOutputDirectory, 'MiniApp.jsbundle')

    await spin('Generating composite bundle for miniapps', reactnative.bundle({
      entryFile: `index.${platform}.js`,
      dev: false,
      bundleOutput: bundleOutputPath,
      assetsDest: bundleOutputDirectory