Closed carson-drake closed 8 years ago
This I did not know. This must have changed. Kind neat, though, because they allow promises to be returned from these hooks instead of just running it until it finishes.
I'm confused. Does add_platform_class.js
not work, then? It seems to work, but it is not a node module.
Unless I had hooks/after_prepare/add_platform_class.js
loaded, the hook would not run. So I can't confidently say it was being executed in package build either.
Not sure if this is just because of my local versions of cordova and ionic-cli, but any javascript hook called out in the config.xml file must be configured as a node module (as seen here). I noticed this after attempting to integrate
android_ignore_translation_errors.js
into my actual project. It failed but locally and withionic package build android -p ### --release
. It's hard to confirm that the ionic package failed attempts were because of this since I can only see the build error, but it was the same build error as I was getting when runningionic build android --release
. After investigating I noticed only hooks in thehooks/after_prepare
directory or.sh
hooks included in the config.xml file were executing. the following seemed to fix my issue locally.