gulp-modernizr3.2.1 • Public • Published
Note: This plugin uses version 3 of Modernizr. Make sure to check the Github repo for the correct feature names (example:
Modernizr.touch was renamed to
gulp-modernizr as a development dependency:
npm install --save-dev gulp-modernizr
Then, add it to your
var modernizr = ;gulp;
Running the plugin will search for tests in your
src files like this one for example:
if !Modernizrobjectfit ;
and in this case add the 'objectfit' test to the ouptut file.
You can optionally pass a fileName to name the Modernizr file (defaults to 'modernizr.js')
modernizr(/*fileName, */ settings)
You can pass settings as an object. See the customizr repository for valid settings.
The 'settings' object can also be required from a JSON file:
'options': 'setClasses''tests': 'webworkers'
customizr repository for valid settings.See the
Currently not passed on to customizr, see issue #36
Defaults to false, setting it to true suppresses any log output from customizr
Will never be passed to customizr, see the Gulp guidelines. The option to uglify the build goes against guidelines #1 and #3. Thus, this setting has been removed from this plugin. You may use
gulp-uglify to achieve this functionality in Gulp:
Copyright (c) 2018 Rejas Licensed under the MIT license.