event-hooks-webpack-plugin
Advanced tools
Comparing version
{ | ||
"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. | ||
[](https://www.npmjs.com/package/event-hooks-webpack-plugin) | ||
[](https://www.npmjs.com/package/event-hooks-webpack-plugin) | ||
[](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. |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
30647
849.41%19
280%59
490%37
23.33%0
-100%1
Infinity%5
Infinity%1
Infinity%