You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

event-hooks-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

event-hooks-webpack-plugin - npm Package Compare versions

Comparing version

to
2.0.0-rc.1

.babelrc

66

package.json
{
"name": "event-hooks-webpack-plugin",
"version": "1.0.0",
"description": "Execute JavaScript on any available Webpack event hook",
"main": "event-hooks.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/cascornelissen/event-hooks-webpack-plugin.git"
},
"keywords": [
"event",
"hook",
"webpack",
"plugin"
],
"author": {
"name": "Cas Cornelissen",
"email": "cas.cornelissen@onefinity.io",
"url": "https://www.onefinity.io/"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/cascornelissen/event-hooks-webpack-plugin/issues"
},
"homepage": "https://github.com/cascornelissen/event-hooks-webpack-plugin#readme"
"name": "event-hooks-webpack-plugin",
"version": "2.0.0-rc.1",
"description": "Execute JavaScript on any available Webpack event hook",
"main": "src/index.js",
"homepage": "https://github.com/cascornelissen/event-hooks-webpack-plugin#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/cascornelissen/event-hooks-webpack-plugin.git"
},
"keywords": [
"event",
"hook",
"webpack",
"plugin"
],
"license": "MIT",
"scripts": {
"test": "jest --verbose",
"test:watch": "jest --watch",
"test:coverage": "jest --collectCoverageFrom='svg-spritemap.js' --coverage"
},
"author": {
"name": "Cas Cornelissen",
"email": "cas.cornelissen@onefinity.io",
"url": "https://www.onefinity.io/"
},
"engines": {
"node": ">= 6.9.0 || >= 8.9.0"
},
"devDependencies": {
"babel-jest": "^22.4.1",
"babel-preset-env": "^1.6.1",
"jest": "^22.4.2",
"webpack": "^4.0.1",
"webpack-cli": "^2.0.9"
},
"peerDependencies": {
"webpack": "^4.0.0"
}
}
# Event Hooks Webpack Plugin
This [Webpack](https://webpack.github.io/) plugin is similar to [`webpack-shell-plugin`](https://www.npmjs.com/package/webpack-shell-plugin) but this allows you to execute arbitrary JavaScript instead of commands on *any* [event hook](https://webpack.js.org/api/plugins/compiler/#event-hooks) that is exposed by the Webpack compiler.
[![npm](https://img.shields.io/npm/v/event-hooks-webpack-plugin.svg?style=flat-square)](https://www.npmjs.com/package/event-hooks-webpack-plugin)
[![npm](https://img.shields.io/npm/dm/event-hooks-webpack-plugin.svg?style=flat-square)](https://www.npmjs.com/package/event-hooks-webpack-plugin)
[![license](https://img.shields.io/github/license/cascornelissen/event-hooks-webpack-plugin.svg?style=flat-square)](LICENSE.md)
This [webpack](https://webpack.github.io/) plugin is similar to [`webpack-shell-plugin`](https://www.npmjs.com/package/webpack-shell-plugin) but this allows you to execute arbitrary JavaScript instead of commands on *any* [event hook](https://webpack.js.org/api/plugins/compiler/#event-hooks) that is exposed by the Webpack compiler.
**Compatibility**
Version `^2.0.0` (`event-hooks-webpack-plugin@next`) of this plugin is compatible with webpack `^4.0.0`. If you're using an older version of webpack, make sure to install the latest `^1.0.0` (`event-hooks-webpack-plugin@latest`) release of this plugin.
## Installation

@@ -11,3 +18,3 @@ ```shell

```js
var EventHooksPlugin = require('event-hooks-webpack-plugin');
const EventHooksPlugin = require('event-hooks-webpack-plugin');

@@ -18,3 +25,3 @@ module.exports = {

new EventHooksPlugin({
'event-name': function() {
'event-name': () => {
// ...

@@ -28,5 +35,5 @@ }

## Options
The plugin consumes an object with [Webpack event hook names](https://webpack.js.org/api/plugins/compiler/#event-hooks) (e.g. `run`, `compile`, or `done`) as keys and functions as values.
The plugin consumes an object with [webpack compiler event hook names](https://github.com/webpack/webpack/blob/213226ece261a0e89edb9de15fbc6775418f6041/lib/Compiler.js#L29) (e.g. `run`, `compile`, or `done`) as keys and functions as values.
## License
This project is [licensed](LICENSE.md) under the [MIT](https://opensource.org/licenses/MIT) license.