New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ionic capacitor hooks #4417
Ionic capacitor hooks #4417
Conversation
I'm not sure why these test are failing, the current develop branch is failing as well. I'm pretty sure it has nothing to do with the changes I have made |
You are definitely right, i did not notice this bug when testing because lodash.snakeCase was fixing it lodash.snakeCase('capacitor,server_url') => 'capacitor_server_url' Co-authored-by: dwieeb <dwieeb@gmail.com>
I don't know why I suggested The hook is technically being called before building the app or running it on a device. We call it before we open the IDE, so it should probably be Other than that, this is looking great! |
Ha ha, I agree and I have changed it to |
To make it complete I have added the |
Moved the [INFO] Ready for use in your Native IDE! message to after the invoke of the The message log code is within the |
I'm not sure if Thanks for fixing that other issue! |
It fine by me to remove or disable the I have saved the work in a separate branch, and update this branch, so they are removed for now. If you changed your mind based on this comment, no problem let me know and I will restore them again :-) |
The only thing |
Awesome work @Heerschop! Thanks for the PR! I'll ship this ASAP. |
Thank you very much, it was nice working together. |
This pull request contains changes to simplify usage of
ionic capacitor
from the CLI and in a CI/CD environment. By adding two extra hooks and by adding environment variables for all the hook shell scripts.Added two ionic capacitor CLI Hooks
ionic:capacitor:run:before
: executed on run before capacitor open is executedionic:capacitor:build:before
: executed on build before capacitor open is executedThe capacitor hooks are executed after the
ionic:serve
andionic:build
hooks.Updated the task run method. The task run method will now supply the shell scripts with generated environment variables based on the information in the Hook Input object.
Example usage
Content example script: build-before.sh
Content example script: capacitor-build-before.sh
Content: package.json
➜ test-cli-app git:(master) ✗ ionic capacitor build android
chunk {polyfills} polyfills-es2015.js, polyfills-es2015.js.map (polyfills) 297 kB [initial] [rendered]
....................
chunk {vendor} vendor-es5.js, vendor-es5.js.map (vendor) 5.39 MB [initial] [rendered]
Date: 2020-05-03T14:19:04.541Z - Hash: cd8ac09eeb78f0a5144a - Time: 9751ms
[INFO] Ready for use in your Native IDE!