You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable users to hook into any cap command to run before and after hooks. This is useful, e.g. to allow users to run custom scripts when running cap sync.
Preferred Solution
.ts file
Allow users to add a .ts file in the project root that contains hooks.
capacitor.config.ts
As the capacitor.config.json will be generated on-the-fly in Capacitor 3, we could also export the hooks here to avoid adding another file.
package.json scripts
Check the scripts defined in the package.json. Scripts named cap:${command}:(before|after) are executed, e.g. cap:copy:before.
The text was updated successfully, but these errors were encountered:
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Feature Request
Description
Enable users to hook into any
cap
command to run before and after hooks. This is useful, e.g. to allow users to run custom scripts when runningcap sync
.Preferred Solution
.ts
fileAllow users to add a
.ts
file in the project root that contains hooks.capacitor.config.ts
As the
capacitor.config.json
will be generated on-the-fly in Capacitor 3, we could also export the hooks here to avoid adding another file.package.json
scriptsCheck the
scripts
defined in thepackage.json
. Scripts namedcap:${command}:(before|after)
are executed, e.g.cap:copy:before
.The text was updated successfully, but these errors were encountered: