<commit_before>grunt-module-graph
==========================

Grunt task to generate a JSON file with the dependency tree in ES6 module files.

Getting Started
---------------
This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out
the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains
how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as
install and use Grunt plugins. Once you're familiar with that process, you may
install this plugin with this command:

```shell
npm install grunt-module-graph --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with
this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-module-graph');
```

The module graph task
---------------------

Run this task with the `grunt module-graph` command. This will generate a JSON
file with all the dependencies of each module specified as a task `src`.

Task targets, files and options may be specified according to the grunt
[Configuring tasks](http://gruntjs.com/configuring-tasks) guide.

Usage example
-------------

### Recommended

```js
grunt.initConfig({
  'module-graph': {
    production: {
      src: ['src/*.js'],
      dest: 'dist/dependencies.json'
    }
  }
});
```

Running this task will generate a file that looks like this:

```json
{
    "module1": ["module2"]
}
```

License<commit_msg>Document includeBindings option<commit_after>grunt-module-graph
==========================

Grunt task to generate a JSON file with the dependency tree in ES6 module files.

Getting Started
---------------
This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out
the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains
how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as
install and use Grunt plugins. Once you're familiar with that process, you may
install this plugin with this command:

```shell
npm install grunt-module-graph --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with
this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-module-graph');
```

The module graph task
---------------------

Run this task with the `grunt module-graph` command. This will generate a JSON
file with all the dependencies of each module specified as a task `src`.

Task targets, files and options may be specified according to the grunt
[Configuring tasks](http://gruntjs.com/configuring-tasks) guide.

Usage example
-------------

### Recommended

```js
grunt.initConfig({
  'module-graph': {
    production: {
      src: ['src/*.js'],
      dest: 'dist/dependencies.json'
    }
  }
});
```

Running this task will generate a file that looks like this:

```json
{
  "module1": ["module2"]
}
```

### Including named imports/exports

Alternatively you can get more information from all you source files by using
the `includeBindings` option:

```js
grunt.initConfig({
  'module-graph': {
    production: {
      options: {
        includeBindings: true
      },
      src: ['src/*.js'],
      dest: 'dist/dependencies.json'
    }
  }
});
```

Chosing this option will generate an output file similar to:

```json
{
  "module1": {
    "imports": {
      "module2": ["someImport", "anotherImport"]
    },
    "exports": ["somethingExported"]
  }
}
```

License
{'fraction_non_alphanumeric': 0.15366705471478465, 'fraction_numerical': 0.004074505238649592, 'mean_word_length': 3.4578469520103763, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1384410', 'n_tokens_mistral': 1044, 'n_tokens_neox': 1000, 'n_words': 377}