<commit_before>auto-install-webpack-plugin
===========================

A [Webpack](http://webpack.github.io/) plugin that automatically installs packages that contain your require'd modules.

Whenever Webpack resolves a requested module, the plugin first checks if the plugin installed and then tries to install the corresponding package using npm.

For example, assuming the package [lodash.times](https://www.npmjs.com/package/lodash.times) is not currently installed, but you require it in your code like this:

```JavaScript
var times = require("lodash.times");

times(5, function(i) {
  console.log(i);
});
```

Running `webpack` nowwithout using the plugin will result in an error because the module cannot be resolved. However, with the plugin enabled `lodash.times` will be automatically installed without forcing you to go to your terminal and execute `npm install lodash.times`.

Automatic installation of packages using the plugin should work in all language that are supported by the various Webpack loaders (such as loaders for Babel or Less).

## Installation ##

`npm install --save-dev auto-install-webpack-plugin`

## Usage ##

Just add an instance of AutoInstallPlugin to your plugins array.

```JavaScript
var AutoInstallPlugin = require("auto-install-webpack-plugin");

module.exports = {
    context: __dirname,
    entry: "./index",

    output: {<commit_msg>Fix some stuff in README.md<commit_after>auto-install-webpack-plugin
===========================

A [Webpack](http://webpack.github.io/) plugin that automatically installs packages that contain your require'd modules.

Whenever Webpack resolves a requested module, the plugin first checks if the module is installed and then tries to install the corresponding package using npm.

For example, assuming the package [lodash.times](https://www.npmjs.com/package/lodash.times) is not currently installed, but you require it in your code like this:

```JavaScript
var times = require("lodash.times");

times(5, function(i) {
  console.log(i);
});
```

Running `webpack` without using the plugin will result in an error because the module cannot be resolved. However, with the plugin enabled `lodash.times` will be automatically installed without forcing you to go to your terminal and execute `npm install lodash.times`.

Automatic installation of packages using the plugin should work in all language that are supported by the various Webpack loaders (such as loaders for Babel or Less).

## Installation ##

`npm install --save-dev auto-install-webpack-plugin`

## Usage ##

Just add an instance of AutoInstallPlugin to your plugins array.

```JavaScript
var AutoInstallPlugin = require("auto-install-webpack-plugin");

module.exports = {
    context: __dirname,
    entry: "./index",

    output: {
{'fraction_non_alphanumeric': 0.10403167746580273, 'fraction_numerical': 0.0007199424046076314, 'mean_word_length': 4.850526315789474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2905928', 'n_tokens_mistral': 726, 'n_tokens_neox': 685, 'n_words': 319}