{"id":15564093,"url":"https://github.com/dahlia/deno-task-hooks","last_synced_at":"2025-04-16T05:51:05.465Z","repository":{"id":232957379,"uuid":"785647367","full_name":"dahlia/deno-task-hooks","owner":"dahlia","description":"A simple way to run Deno tasks as Git hooks","archived":false,"fork":false,"pushed_at":"2024-06-21T07:10:25.000Z","size":19,"stargazers_count":29,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T05:04:35.649Z","etag":null,"topics":["deno","git-hooks"],"latest_commit_sha":null,"homepage":"https://jsr.io/@hongminhee/deno-task-hooks","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dahlia.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}},"created_at":"2024-04-12T10:17:56.000Z","updated_at":"2025-03-14T19:06:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"1bbd8a52-f654-402b-9fbe-747996b1689c","html_url":"https://github.com/dahlia/deno-task-hooks","commit_stats":null,"previous_names":["dahlia/deno-task-hooks"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fdeno-task-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fdeno-task-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fdeno-task-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fdeno-task-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dahlia","download_url":"https://codeload.github.com/dahlia/deno-task-hooks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249204971,"owners_count":21229840,"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":["deno","git-hooks"],"created_at":"2024-10-02T16:36:19.983Z","updated_at":"2025-04-16T05:51:05.435Z","avatar_url":"https://github.com/dahlia.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- deno-fmt-ignore-file --\u003e\n\ndeno-task-hooks\n===============\n\n[![JSR][JSR badge]][JSR]\n[![GitHub Actions][GitHub Actions badge]][GitHub Actions]\n\nThis package provides a simple way to run [Deno tasks] as [Git hooks].  You can\ndefine Git hooks in your *deno.json* file and share them with your team.\n\n[JSR]: https://jsr.io/@hongminhee/deno-task-hooks\n[JSR badge]: https://jsr.io/badges/@hongminhee/deno-task-hooks\n[GitHub Actions]: https://github.com/dahlia/deno-task-hooks/actions/workflows/main.yaml\n[GitHub Actions badge]: https://github.com/dahlia/deno-task-hooks/actions/workflows/main.yaml/badge.svg\n\n\nHow to set up\n-------------\n\nFirst of all, you need to add `hooks:install` task to your *deno.json* file:\n\n~~~~ json\n{\n  \"tasks\": {\n    \"hooks:install\": \"deno run --allow-read=deno.json,.git/hooks/ --allow-write=.git/hooks/ jsr:@hongminhee/deno-task-hooks\"\n  }\n}\n~~~~\n\nThis `hooks:install` task will install the hooks defined in your *deno.json*\nfile to your *.git/hooks* directory.  Let your team members run this task\nimmediately after cloning your repository.\n\nThen, you can define your Git hooks in your *deno.json* file.  All hooks are\nprefixed with `hooks:` and followed by the hook name (which is kebab-cased).\nFor example, to define a `pre-commit` hook, you can add the following task:\n\n~~~~ json\n{\n  \"tasks\": {\n    \"hooks:pre-commit\": \"deno check *.ts \u0026\u0026 deno lint\"\n  }\n}\n~~~~\n\nThen, install the hooks by running the following command:\n\n~~~~ sh\ndeno task hooks:install\n~~~~\n\nNow, the `pre-commit` hook is installed to your *.git/hooks* directory.  That's\nit!  You can now run `git commit` and see your `pre-commit` hook in action.\n\n[Deno tasks]: https://docs.deno.com/runtime/manual/tools/task_runner\n[Git hooks]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdahlia%2Fdeno-task-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdahlia%2Fdeno-task-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdahlia%2Fdeno-task-hooks/lists"}