{"id":16925835,"url":"https://github.com/cascornelissen/event-hooks-webpack-plugin","last_synced_at":"2025-04-05T07:06:59.062Z","repository":{"id":19406553,"uuid":"86933205","full_name":"cascornelissen/event-hooks-webpack-plugin","owner":"cascornelissen","description":"Event hooks plugin for webpack","archived":false,"fork":false,"pushed_at":"2025-03-22T03:34:33.000Z","size":2186,"stargazers_count":34,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T06:08:26.128Z","etag":null,"topics":["event-hooks","webpack","webpack-plugin"],"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/cascornelissen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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},"funding":{"github":"cascornelissen"}},"created_at":"2017-04-01T18:19:20.000Z","updated_at":"2025-03-22T03:34:35.000Z","dependencies_parsed_at":"2023-01-11T20:27:19.986Z","dependency_job_id":"86cf197b-2927-4f2b-8498-249680605b03","html_url":"https://github.com/cascornelissen/event-hooks-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cascornelissen%2Fevent-hooks-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cascornelissen%2Fevent-hooks-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cascornelissen%2Fevent-hooks-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cascornelissen%2Fevent-hooks-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cascornelissen","download_url":"https://codeload.github.com/cascornelissen/event-hooks-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299832,"owners_count":20916190,"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":["event-hooks","webpack","webpack-plugin"],"created_at":"2024-10-13T20:11:44.356Z","updated_at":"2025-04-05T07:06:59.037Z","avatar_url":"https://github.com/cascornelissen.png","language":"TypeScript","funding_links":["https://github.com/sponsors/cascornelissen"],"categories":[],"sub_categories":[],"readme":"# Event Hooks Webpack Plugin\n[![npm](https://img.shields.io/npm/v/event-hooks-webpack-plugin.svg?style=flat-square)](https://www.npmjs.com/package/event-hooks-webpack-plugin)\n[![npm](https://img.shields.io/npm/dm/event-hooks-webpack-plugin.svg?style=flat-square)](https://www.npmjs.com/package/event-hooks-webpack-plugin)\n[![license](https://img.shields.io/github/license/cascornelissen/event-hooks-webpack-plugin.svg?style=flat-square)](LICENSE.md)\n\nThis [Webpack][webpack] plugin is similar to [`webpack-shell-plugin`][webpack-shell-plugin] but it allows executing\narbitrary code instead of commands on *any* [compiler hook][webpack-compiler-hooks] that is made available by Webpack.\n\n## Installation\n```shell\nnpm install event-hooks-webpack-plugin --save-dev\n```\n\n## Usage\n```js\nimport EventHooksPlugin from 'event-hooks-webpack-plugin';\n\nexport default {\n    // ...\n    plugins: [\n        new EventHooksPlugin({\n            initialize: () =\u003e {\n                // ...\n            }\n        })\n    ]\n};\n```\n\n## Options\nThe plugin consumes an object with [Webpack compiler event hook names][webpack-compiler-hooks] (e.g. `run`, `compile`,\nand `done`) as keys and functions as values.\n\n### Tapable\nWebpack's compiler uses [Tapable][webpack-tapable] which supports different classes of hooks. This plugin supports\nsynchronous, promise-based, and callback-based hooks through the exported `tap`, `tapPromise` and `tapAsync` methods.\nBy default, the plugin uses `tap`.\n\n```js\nimport EventHooksPlugin, { tapPromise, tapAsync } from 'event-hooks-webpack-plugin';\n\nexport default {\n    // ...\n    plugins: [\n        new EventHooksPlugin({\n            emit: tapAsync(() =\u003e {\n                // ...\n            }),\n            run: tapPromise(() =\u003e {\n                // ...\n            })\n        })\n    ]\n};\n```\n\n## License\nThis project is [licensed](LICENSE.md) under the [MIT][mit-license] license.\n\n\n\n[webpack]: https://webpack.github.io/\n[webpack-tapable]: https://github.com/webpack/tapable#tapable\n[webpack-shell-plugin]: https://www.npmjs.com/package/webpack-shell-plugin\n[webpack-compiler-hooks]: https://webpack.js.org/api/compiler-hooks/\n[mit-license]: https://opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcascornelissen%2Fevent-hooks-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcascornelissen%2Fevent-hooks-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcascornelissen%2Fevent-hooks-webpack-plugin/lists"}