I have two questions about Worklight 6.2 build process:
Question 1: Is it possible to integrate the standard Worklight (6.2) build process with a custom build step?
I need to add it as follows:
Question 2 (about step 3): Is it possible to modify wlapp files before wlapp packaging process (immediatly after the optimization step)?
I'm using the CLI command: wl build.
As of Worklight 6.2, there is no supported way to perform custom activities during the standard Worklight build. For production purposes, where you may want to obfuscate JS, shrink images, etc, it is common to perform this on a build system, PRIOR to the WL build and packaging. This complicates the per-environment optimization, but is the best we can do at this time.
As far as hacking the resulting WLApp file, I do not believe this could be done, as it will fail security checks, once deployed.
We are looking to enable extending the build process in a future release. There are already RFEs defined for this that we are evaluating. Along similar lines, we are looking into providing easy obfuscation of JS resources during a build. This is already possible with Mobile and Desktop WebApps, that we want to extend to include deployable apps.