During the Appflow build process, it might be necessary to run custom scripts and it is important to know what will and won't run.
Cordova hooks are specified in your
config.xml and when used with the Cordova CLI will execute scripts. Appflow however uses Gym to compile your Application, so Cordova hooks will not run with the exception of
Ionic has a set of hooks which are specified in your
package.json to execute scripts during certain events. These hooks do not run with Appflow.
Npm will execute scripts before and after a command is run (documented here). If you create a script called
postbuild in your
package.json these will run before and after the
build step in Appflow.
postbuild script of
package.json will run after your web source code is compiled and not after your native code is compiled.
If you are looking to run scripts during the Appflow build process you can use npm pre & post scripts or the
after_prepare hooks for cordova projects. For additional automation options look at the Appflow Automation feature.