ern-container-transformer-build-config

1.1.1 • Public • Published

iOS Build Configuration Container Transformer

ci

This transformer can be used to update Build Configuration(s) of a generated iOS Container.

The official iOS Electrode Native Container currently exposes four build configurations:

Each of these build configurations are coming with some build settings that might not play well with your native application upon integration of the Container.

Using this transformer, you can update one or more of these build configurations with your desired build settings.

Inputs

  • containerPath : Path to the Container to transform
  • configurations : Array of build configurations to update
    For example:
["ElectrodeContainer-Debug"]
  • settings: Object containing the settings to add/update to/in the build configuration(s)
    For example:
{
  "ENABLE_BITCODE": "NO",
  "PRODUCT_BUNDLE_IDENTIFIER": "com.mycompany.ElectrodeContainer"
}

Usage

With ern transform-container CLI command

ern transform-container --containerPath [pathToContainer] -t build-config -e '{"configurations":[...], "settings":{...}}'

Instead of passing the whole configuration on the command line for --extra/-e, it is also possible to use a file path to a json file holding the configuration, or a path to a file stored in the Cauldron. Check out the ern transform-container command documentation for more info.

The configuration object can also be an array holding multiple objects, such as [{"configurations":[...], "settings":{...}}, {"configurations":[...], "settings":{...}}]

With Cauldron

To automatically transform the Cauldron generated Containers of a target native application and platform, you can add a transformer entry in the Cauldron in the Container generator configuration object as follow :

Electrode Native <= 0.31

"transformers"[
  {
    "name": "build-config",
    "extra": {
      "configurations": [],
      "settings" : {}
    }
  }
]

Electrode Native >= 0.32

"pipleline"[
  {
    "name": "build-config",
    "extra": {
      "configurations": [],
      "settings": {}
    }
  }
]

The extra object can also be an array holding multiple objects, such as [{"configurations":[...], "settings":{...}}, {"configurations":[...], "settings":{...}}]

Programmatically

import BuildConfigTransformer from 'ern-container-transformer-build-config'
const transformer = new BuildConfigTransformer()
transformer.transform(
  {
    /* Local file system path to the Container */
    containerPath: string
    /* Extra data specific to this publisher */
    extra?: {
      /* Array of build configurations to update */
      configurations: string[]
      /* Object containing the settings to add/update to/in the build configuration(s) */
      settingsobject
    }
  }
})

The extra object can also be an array holding multiple objects, such as

[
  {
    "configurations": [],
    "settings": {}
  }, {
    "configurations": [],
    "settings": {}
  }
]

Package Sidebar

Install

npm i ern-container-transformer-build-config

Weekly Downloads

5

Version

1.1.1

License

Apache-2.0

Unpacked Size

29 kB

Total Files

15

Last publish

Collaborators

  • electrode-native