Skip to content

alexan/grunt-modernizr

 
 

Repository files navigation

grunt-modernizr

Build Status

NPM

A Grunt wrapper for Modernizr.

Usage

Install this grunt plugin next to your project's Gruntfile.js:

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 with:

npm install grunt-modernizr --save-dev

Then add this line to your project's Gruntfile.js:

grunt.loadNpmTasks("grunt-modernizr");

Documentation

Command Line

Run the task with grunt modernizr:dist.

Config Options

Add a modernizr config object to your Gruntfile.js file. The task supports multiple targets:

modernizr: {

	dist: {

		// Path to save out the built file
		"dest" : "build/modernizr-custom.js",
		// More settings go here
	}
	}

}

You can also generate the configuration file online via the modernizr build tool. Just configure your build, click the Build button, and download/copy the Grunt Config.

Available Settings

See the customizr repository for valid settings.

License

Copyright (c) 2015 Richard Herrera Licensed under the MIT license.

About

Build out a lean, mean Modernizr machine.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.0%
  • CSS 2.0%