{"id":20931572,"url":"https://github.com/johnwargo/cdva-make-hooks","last_synced_at":"2026-02-06T04:03:18.713Z","repository":{"id":24651892,"uuid":"28061887","full_name":"johnwargo/cdva-make-hooks","owner":"johnwargo","description":"Automating the creation of the Cordova Hooks folders","archived":false,"fork":false,"pushed_at":"2024-11-15T21:04:22.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-13T01:43:38.238Z","etag":null,"topics":["cordova","npm"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cdva-hooks","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnwargo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-12-15T23:51:05.000Z","updated_at":"2024-11-15T21:04:26.000Z","dependencies_parsed_at":"2025-04-11T13:23:05.996Z","dependency_job_id":"da32a82c-7d2c-45f4-a961-96a282e1b090","html_url":"https://github.com/johnwargo/cdva-make-hooks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johnwargo/cdva-make-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwargo%2Fcdva-make-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwargo%2Fcdva-make-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwargo%2Fcdva-make-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwargo%2Fcdva-make-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnwargo","download_url":"https://codeload.github.com/johnwargo/cdva-make-hooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwargo%2Fcdva-make-hooks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260215713,"owners_count":22975995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cordova","npm"],"created_at":"2024-11-18T21:44:13.013Z","updated_at":"2026-02-06T04:03:18.707Z","avatar_url":"https://github.com/johnwargo.png","language":null,"funding_links":["https://www.buymeacoffee.com/johnwargo"],"categories":[],"sub_categories":[],"readme":"# Cordova Hooks (cdva-hooks)\n\nAutomates the creation of a Apache Cordova project's hooks folders. With hooks folders, any executable code placed in the folder is executed at specific points in the Cordova project lifecycle. Developers create separate folders for each event they want to augment with their custom code, and the Cordova CLI automatically takes care of the process. The Cordova hooks folders are placed in a Cordova project folder called `hooks`. For details on the Cordova hooks approach, see [http://cordova.apache.org/docs/en/dev/guide/appdev/hooks/index.html](http://cordova.apache.org/docs/en/dev/guide/appdev/hooks/index.html). \n\n**Note**: *Unfortunately, the hooks folder approach was deprecated [http://cordova.apache.org/docs/en/dev/guide/appdev/hooks/index.html#via-hooks-directory-deprecated](http://cordova.apache.org/docs/en/dev/guide/appdev/hooks/index.html#via-hooks-directory-deprecated), but apparently it still works until they remove it completely.*  \n\n## Installation\n\nTo install the module, open a terminal window and execute the following command:\n\n\tnpm install -g cdva-hooks \n\n## Usage\n\nExecute the module by executing the `cdva-hooks` command at a command-line. The module expects to be executed from a Cordova project folder (although it doesn't check to see if it's in a Cordova project folder) and accepts the following command-line switches:\n\n+ `-all`: Create all hooks folders\n\n+ `-l`: List all hooks options\n\n**Examples:**\n\nTo display this modules's help file, issue the `cdva-hooks` command without any parameters:\n\n\tcdva-hooks\n\nTo create all of the Cordova `hooks` folders, use the following:\n\n    cdva-hooks -all\n\t\nTo list the available Cordova hooks options use the following:\n\n    cdva-hooks -l\n\nTo create folders for specific hooks, specify one or more hooks on the command-line. \n\n    cdva-hooks hook_list\n\nSo, for example, to create the `platform_add` and `prepare` hooks folders, use the following:\n\n    cdva-hooks platform_add prepare\n\t\nSince both of those have before and after options, the command will create the following folders:\n\n\tbefore_platform_add\n\tafter_platform_add\n\tbefore_prepare\n\tafter_prepare\n\n## Revision History\n\nOctober 8, 2016 - Changed the code that processes command-line arguments. Updated the hooks folder list, removing some and adding others.\n\nJuly 26, 2015 - Fixed serious issues with the readme file - it listed cdvahook instead of cdva-hooks everywhere. Noticed as part of this that the node command used to invoke this didn't align with the module name, so I (sorry) changed it. Originally, the command was invoked using cdvahook, but because the module name is different, I changed it to match the module name.  \n\n***\n\nYou can find information on many different topics on my [personal blog](http://www.johnwargo.com).\n\nIf you find this code useful and feel like thanking me for providing it, please consider \u003ca href=\"https://www.buymeacoffee.com/johnwargo\" target=\"_blank\"\u003eBuying Me a Coffee\u003c/a\u003e, or making a purchase from [my Amazon Wish List](https://amzn.com/w/1WI6AAUKPT5P9).\n            \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnwargo%2Fcdva-make-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnwargo%2Fcdva-make-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnwargo%2Fcdva-make-hooks/lists"}