4.0.1 • Published 4 months ago

grunt-modernizr v4.0.1

Weekly downloads
4,120
License
MIT
Repository
github
Last release
4 months ago

grunt-modernizr

Build Status npm version

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

For Full Features & Configuration? → See Customizr

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: {
    "parseFiles": true,
    "customTests": [],
    "devFile": "/PATH/TO/modernizr-dev.js",
    "dest": "/PATH/TO/modernizr-output.js",
    "tests": [
      // Tests
    ],
    "options": [
      "setClasses"
    ],
    "uglify": true
  }
}

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) 2024 The Modernizr team Licensed under the MIT license.

4.0.1

4 months ago

4.0.0

8 months ago

3.0.4

1 year ago

3.0.3

2 years ago

3.0.2

3 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.1

5 years ago

1.0.3

6 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

9 years ago

0.6.1

9 years ago

0.6.0

10 years ago

0.5.2

10 years ago

0.5.1

10 years ago

0.5.0

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.1

10 years ago

0.3.0

11 years ago

0.2.2

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.6

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

12 years ago

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago