New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-modernizr

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-modernizr

Gulp wrapper for custom Modernizr builds

  • 0.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
575
decreased by-77.08%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-modernizr

Build Status

A Gulp wrapper for Modernizr.

Note: This plugin uses version 3 of Modernizr. Version 3 is a complete rewrite of the library and is not yet officially released. Make sure to check the Github repo for the correct feature names (example: Modernizr.touch was renamed to Modernizr.touchevents).

Usage

First, install gulp-modernizr as a development dependency:

npm install --save-dev gulp-modernizr

Then, add it to your gulpfile.js:

var modernizr = require('gulp-modernizr');

gulp.task('modernizr', function() {
  gulp.src('./js/*.js')
    .pipe(modernizr())
    .pipe(gulp.dest("build/"))
});

API

modernizr(fileName)

fileName

Type: String

You can optionally pass a fileName to name the Modernizr file (defaults to 'modernizr.js')

gulp.src('./js/*.js')
  .pipe(modernizr('modernizr-custom.js'));

modernizr(/*fileName, */ settings)

settings

Type: Object

You can pass settings as an object. See the customizr repository for valid settings.

gulp.src('./js/*.js')
  .pipe(modernizr({
    excludeTests: ['csstransforms3d']
  }));
Available Settings
See the customizr repository for valid settings.
settings.uglify

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

gulp.src('./js/*.js')
  .pipe(modernizr())
  .pipe(uglify())
  .pipe(gulp.dest("build/"));

License

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

Keywords

FAQs

Package last updated on 27 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc