<commit_before># grunt-modernizr

`grunt-modernizr` is a Modernizr builder for your project. It is based on the Modernizr team's [Modulizr](https://github.com/Modernizr/modernizr.com/blob/gh-pages/i/js/modulizr.js) tool.

This highly configurable task allows you to configure and export a custom Modernizr build. Use Modernizr's [annotated source](http://modernizr.com/downloads/modernizr-latest.js) for development, and let this tool worry about optimization.

When you're ready to build, `grunt-modernizr` will crawl your project for Modernizr test references and save out a minified, uglified, customized version, using only the tests you've used in your JavaScript or (S)CSS.

## Getting Started
Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-modernizr`

Then add this line to your project's `grunt.js` gruntfile:

```javascript
grunt.loadNpmTasks("grunt-modernizr");
```

[grunt]: https://github.com/cowboy/grunt
[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md

## Documentation

Add a `modernizr` config object to your grunt.js file:

```javascript
modernizr: {
	// Based on default settings on http://modernizr.com/download/
	"extra" : {
		"shiv" : true,
		"printshiv" : false,
		"load" : true,
		"mq" : false,
		"cssclasses" : true
	},

	// Based on default settings on http://modernizr.com/download/
	"extensibility" : {
		"addtest" : false,
		"prefixed" : false,
		"teststyles" : false,
		"testprops" : false,
		"testallprops" : false,
		"hasevents" : false,
		"prefixes" : false,
		"domprefixes" : false
	},

	// Define any tests you want to impliticly include
	"tests" : [],

	// Path to the build you're using for development.
	"devFile" : "lib/modernizr-dev.js",

	// Path to save out the built file
	"outputFile" : "build/modernizr-custom.js",

	// By default, this task will crawl your project for references to Modernizr tests
	// Set to false to disable
	"parseFiles" : true,

	// When parseFiles = true, this task will crawl all *.js, *.css files.
	// You can override this by defining a "files" array below
	// files : [],

	// Have custom Modernizr tests? Add paths to their location here.
	"customTests" : [],

	// Files added here will be excluded when looking for Modernizr refs.
	"excludeFiles" : []
}
```

### Config Options

###### **`extra`** (Object)
An object of extra configuration options. Check the extra section on [modernizr.com/download](http://modernizr.com/download/) for complete options. Defaults are as they appear on the official site.

###### **`extensibility`** (Object)
An object of extensibility options. Check the section on [modernizr.com/download](http://modernizr.com/download/) for complete options. Defaults are as they appear on the official site.

###### **`tests`** (Array)
Define any tests you want to impliticly include. Test names are lowercased, separated by underscores (if needed). Check out the full set of test options [here](https://github.com/Modernizr/modernizr.com/blob/gh-pages/i/js/modulizr.js#L15-157).

###### **`devFile`** (String)
Path to the build file you're using for development.

###### **`outputFile`** (String)
Path to save the customized Modernizr build.

###### **`parseFiles`** (Boolean)
By default, this task will crawl your project for references to Modernizr tests. Set to false to disable.

###### **`files`** (Array)
When `parseFiles` = `true`, this task will crawl all `*.js`, `*.css` files. You can override this by defining a custom `files` array below. The object supports all [minimatch](https://github.com/isaacs/minimatch) options.

###### **`customTests`** (Array)
Have custom Modernizr tests? Add paths to their location here. The object supports all [minimatch](https://github.com/isaacs/minimatch) options.

###### **`excludeFiles`** (Array)
Files added here will be excluded when looking for Modernizr refs. The object supports all [minimatch](https://github.com/isaacs/minimatch) options.

## License
Copyright (c) 2012 <NAME>
Licensed under the MIT license.<commit_msg>Adding documentation for required config parameters.<commit_after># grunt-modernizr

`grunt-modernizr` is a Modernizr builder for your project. It is based on the Modernizr team's [Modulizr](https://github.com/Modernizr/modernizr.com/blob/gh-pages/i/js/modulizr.js) tool.

This highly configurable task allows you to configure and export a custom Modernizr build. Use Modernizr's [annotated source](http://modernizr.com/downloads/modernizr-latest.js) for development, and let this tool worry about optimization.

When you're ready to build, `grunt-modernizr` will crawl your project for Modernizr test references and save out a minified, uglified, customized version, using only the tests you've used in your JavaScript or (S)CSS.

## Getting Started
Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-modernizr`

Then add this line to your project's `grunt.js` gruntfile:

```javascript
grunt.loadNpmTasks("grunt-modernizr");
```

[grunt]: https://github.com/cowboy/grunt
[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md

## Documentation

Add a `modernizr` config object to your grunt.js file:

```javascript
modernizr: {

	// [REQUIRED] Path to the build you're using for development.
	"devFile" : "lib/modernizr-dev.js",

	// [REQUIRED] Path to save out the built file.
	"outputFile" : "build/modernizr-custom.js",

	// Based on default settings on http://modernizr.com/download/
	"extra" : {
		"shiv" : true,
		"printshiv" : false,
		"load" : true,
		"mq" : false,
		"cssclasses" : true
	},

	// Based on default settings on http://modernizr.com/download/
	"extensibility" : {
		"addtest" : false,
		"prefixed" : false,
		"teststyles" : false,
		"testprops" : false,
		"testallprops" : false,
		"hasevents" : false,
		"prefixes" : false,
		"domprefixes" : false
	},

	// Define any tests you want to impliticly include.
	"tests" : [],

	// By default, this task will crawl your project for references to Modernizr tests.
	// Set to false to disable.
	"parseFiles" : true,

	// When parseFiles = true, this task will crawl all *.js, *.css files.
	// You can override this by defining a "files" array below.
	// files : [],

	// Have custom Modernizr tests? Add paths to their location here.
	"customTests" : [],

	// Files added here will be excluded when looking for Modernizr refs.
	"excludeFiles" : []
}
```

### Config Options

#### Required

###### **`devFile`** (String)
Path to the build file you're using for development. This is a required parameter.

###### **`outputFile`** (String)
Path to save the customized Modernizr build. This is a required parameter.

#### Optional

###### **`extra`** (Object)
An object of extra configuration options. Check the extra section on [modernizr.com/download](http://modernizr.com/download/) for complete options. Defaults are as they appear on the official site.

###### **`extensibility`** (Object)
An object of extensibility options. Check the section on [modernizr.com/download](http://modernizr.com/download/) for complete options. Defaults are as they appear on the official site.

###### **`tests`** (Array)
Define any tests you want to impliticly include. Test names are lowercased, separated by underscores (if needed). Check out the full set of test options [here](https://github.com/Modernizr/modernizr.com/blob/gh-pages/i/js/modulizr.js#L15-157).

###### **`parseFiles`** (Boolean)
By default, this task will crawl your project for references to Modernizr tests. Set to false to disable.

###### **`files`** (Array)
When `parseFiles` = `true`, this task will crawl all `*.js`, `*.css` files. You can override this by defining a custom `files` array below. The object supports all [minimatch](https://github.com/isaacs/minimatch) options.

###### **`customTests`** (Array)
Have custom Modernizr tests? Add paths to their location here. The object supports all [minimatch](https://github.com/isaacs/minimatch) options.

###### **`excludeFiles`** (Array)
Files added here will be excluded when looking for Modernizr refs. The object supports all [minimatch](https://github.com/isaacs/minimatch) options.

## License
Copyright (c) 2012 <NAME>
Licensed under the MIT license.
{'fraction_non_alphanumeric': 0.13121463825689178, 'fraction_numerical': 0.0021668472372697724, 'mean_word_length': 4.419439008480104, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7600884', 'n_tokens_mistral': 2716, 'n_tokens_neox': 2533, 'n_words': 922}