{"id":15986650,"url":"https://github.com/luxass/hooxs","last_synced_at":"2025-07-09T21:34:17.299Z","repository":{"id":209268326,"uuid":"686347565","full_name":"luxass/hooxs","owner":"luxass","description":"Build a powerful project with typed hooks for a smooth plugin API. ✨","archived":false,"fork":false,"pushed_at":"2025-03-11T15:53:50.000Z","size":405,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T16:39:44.838Z","etag":null,"topics":["hook","hooks","tapable"],"latest_commit_sha":null,"homepage":"","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/luxass.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-02T13:41:13.000Z","updated_at":"2025-02-28T04:25:17.000Z","dependencies_parsed_at":"2023-12-02T05:42:20.013Z","dependency_job_id":"db2ec5e8-2233-4351-9ca2-4265adf693a3","html_url":"https://github.com/luxass/hooxs","commit_stats":null,"previous_names":["luxass/hooxs"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Fhooxs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Fhooxs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Fhooxs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Fhooxs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luxass","download_url":"https://codeload.github.com/luxass/hooxs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243891911,"owners_count":20364605,"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":["hook","hooks","tapable"],"created_at":"2024-10-08T03:02:28.307Z","updated_at":"2025-03-17T23:30:44.445Z","avatar_url":"https://github.com/luxass.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hooxs\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n\nEffortlessly empower your project with typed hooks, enabling you to easily construct a plugin API for your needs.\n\n## 📦 Installation\n\n```sh\nnpm install hooxs\n```\n\n## 📚 Usage\n\n```ts\nimport { createHooks } from \"hooxs\";\n\ninterface RuntimeHooks {\n  \"build:before\": () =\u003e void;\n  \"build:after\": (files: string[]) =\u003e void;\n  // can either be registered inside the hooks object or registered at a later point\n  \"config:load\"?: (config: Record\u003cstring, unknown\u003e) =\u003e void;\n}\n\nconst hooks = createHooks\u003cRuntimeHooks\u003e({\n  \"build:before\": () =\u003e {\n    console.log(\"before build\");\n  },\n  \"build:after\": (files) =\u003e {\n    console.log(\"after build\", files);\n  },\n});\n// or initialize hooks at a later point\nconst hooks = createHooks\u003cRuntimeHooks\u003e();\n\nhooks.on(\"config:load\", (config) =\u003e {\n  console.log(\"config loaded\", config);\n});\n\nawait hooks.call(\"build:before\");\nconst files = [\"index.js\", \"index.css\"];\n\nawait hooks.call(\"build:after\", files);\n```\n\n## 📄 License\n\nPublished under [MIT License](./LICENSE).\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/hooxs?style=flat\u0026colorA=18181B\u0026colorB=4169E1\n[npm-version-href]: https://npmjs.com/package/hooxs\n[npm-downloads-src]: https://img.shields.io/npm/dm/hooxs?style=flat\u0026colorA=18181B\u0026colorB=4169E1\n[npm-downloads-href]: https://npmjs.com/package/hooxs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxass%2Fhooxs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluxass%2Fhooxs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxass%2Fhooxs/lists"}