<commit_before># grunt-pkgrev

> Add revision number to your files based on package.json version.

> WARNING: THIS CODE IS NOT PRODUCTION READY

> WARNING: THIS README IS NOT UPDATED

## Getting Started
This plugin requires Grunt `~0.4.2`

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-pkgrev --save-dev
```

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

```js
grunt.loadNpmTasks('grunt-pkgrev');
```

## The "pkgrev" task

### Overview
In your project's Gruntfile, add a section named `pkgrev` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  pkgrev: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    },
  },
});
```

### Options

#### options.separator
Type: `String`
Default value: `',  '`

A string value that is used to do something with whatever.

#### options.punctuation
Type: `String`
Default value: `'.'`

A string value that is used to do something else with whatever else.

### Usage Examples

#### Default Options
In this example, the default options are used to do something with whatever. So if the `testing` file has the content `Testing` and the `123` file had the content `1 2 3`, the generated result would be `Testing, 1 2 3.`

```js
grunt.initConfig({
  pkgrev: {
    options: {},
    files: {
      'dest/default_options': ['src/testing', 'src/123'],
    },
  },
});
```

#### Custom Options
In this example, custom options are used to do something else with whatever else. So if the `testing` file has the content `Testing` and the `123` file had the content `1 2 3`, the generated result in this case would be `Testing: 1 2 3 !!!`

```js
grunt.initConfig({
  pkgrev: {
    options: {
      separator: ': ',
      punctuation: ' !!!',
    },
    files: {
      'dest/default_options': ['src/testing', 'src/123'],
    },
  },
});
```

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History
_(Nothing yet)_<commit_msg>Update README.md with options examples<commit_after># grunt-pkgrev

> Add revision number to your files based on package.json version.

> WARNING: THIS CODE IS NOT PRODUCTION READY

> WARNING: THIS README IS NOT UPDATED

## Getting Started
This plugin requires Grunt `~0.4.2`

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-pkgrev --save-dev
```

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

```js
grunt.loadNpmTasks('grunt-pkgrev');
```

## The "pkgrev" task

### Overview
In your project's Gruntfile, add a section named `pkgrev` to the data object passed into `grunt.initConfig()`. 

```js
grunt.initConfig({
  pkgrev: {
      all_options: {
        options: {
          'revmap': 'test/output/all/revmap.json',
        },
        files: {
          'all': ['test/output/all/assets/**/*'],
        },
      },
      only_options: {
        options: {
          'revmap': 'test/output/only/revmap.json',
        },
        files: {
          'only': ['test/output/only/assets/**/*.{css,js,jpg}'],
        },
      },
      all_except_options: {
        options: {
          'revmap': 'test/output/except/revmap.json',
        },
        files: {
          'except': ['test/output/except/assets/**/*', '!test/output/except/**/*.{png,jpg}'],
        },
      },
    }
});
```

### Options

#### options.revmap
Type: `String`
Default value: `'revmap.json'`

The path where you want to save the generated revmap.json file. The default is in the project root.

#### Files
Type: `String` | `Array`

The files you want to rev. Currently this is a destructive operation. Use in conjunction with `copy` or similar to move original files.
Typically you would rev after is said and done inside the distribution directory. See the `Gruntfile.js` for sample flow working with `grunt-contrib-copy`, `grunt-bump`
and `grunt-usemin`.

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History
0.1.0 - Contribute, Comment, Fork, Enjoy!
{'fraction_non_alphanumeric': 0.1263681592039801, 'fraction_numerical': 0.006567164179104477, 'mean_word_length': 3.366637706342311, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3123574', 'n_tokens_mistral': 1569, 'n_tokens_neox': 1508, 'n_words': 583}