Comment on page
Electrode Native container tries to be as agnostic as possible so that it can be added to a client application without requiring any custom modifications.
That being said, in some cases, some tweaking or post-processing of the generated container project might be needed. For example, to update some build settings of the iOS container, or gradle settings of the Android container, or to transform the container in a more radical way (for example transforming an iOS container to a pre-compiled fat binary framework). Because the container is generated by Electrode Native, any manual changes done post generation, would be overwritten by a new generation.
While it is totally possible to write your own transformers without relying on Electrode Native, for example just writing some automation scripts to perform your required transformations, we would recommend using Electrode Native transformers as it better fits in Electrode Native worfklow and can be used part in an Electrode Native pipelines. If you really need to run your own custom transformation script, you can use the [script-transformer] that allows to run any arbitrary custom made script as a transformer.
As for publishers, transformers have their own specific configuration, that can be supplied directly to the
transform-containercommand or inlined in a json configuration file part of a pipeline configuration.
Here is a list of current container transformed offered by Electrode Native :
There are two ways to use a
implicitly. Based on your needs and your context, you might need one way or the other (or both).
Explicilt transformer use
Electrode Native offers the [transform-container] command that can be used to transform a container. This commands does not require a cauldron. It cam transform any pre-generated container.
It is possible to run the [transform-container] command multiple times for the same container, to chain transformation on the container.
The use of the [create-container] / [transform-container] commands combo, will be mostly useful for development and experimentation with Electrode Native. It can also be used for automation purposes (CI) in some contexts.
Implicit transformer use
A transformer will be implicitly used when executing a container generation pipeline containing a transformer.
When explicilty transforming a container, using the
transform-containercommand, the transformer configuration should be supplied on the command line. Extra configuration, specific to the transformer, can however kept in a separate json configuration file stored locally or in a cauldron. Refer to the
transform-containercommand documentation for more information.
Container transformers can also be added to a container generation
pipeline, stored in a cauldron, so that it can be shared across users of the Cauldron and automatically triggered whenever regenerating a container from cauldron, using cauldron subcommands.
As previously mentionned, Electrode Native container transformers are standalone node packages (published to npm) and retrieved dynamically _(they are not packaged within Electrode Native itself). In that sense it is quite easy to implement (and eventually distribute) your own container transforrmer if needed.
A few things to keep in mind when creating a Container publisher :
- The package name must include
ern-container-transformer. This is a convention for Electrode Native Container transformers, and is enforced by Electrode Native.
- You should add a keyword
ern-container-transformerin the keywords list of the package.json. This is not required, but could be leveraged later on by Electrode Native to facilitate container transformers discovery.