Skip to content

Instantly share code, notes, and snippets.

@bshack
Created March 13, 2016 01:00
Show Gist options
  • Save bshack/5ed1e118f54df54efa4f to your computer and use it in GitHub Desktop.
Save bshack/5ed1e118f54df54efa4f to your computer and use it in GitHub Desktop.
using gulp with modernizr
// ## Modernizr Task
// config example: https://github.com/Modernizr/Modernizr/blob/master/lib/config-all.json
var gulp = require('gulp');
var modernizr = require('modernizr');
var fs = require('fs');
gulp.task('modernizr', function(callback) {
'use strict';
modernizr.build({
'feature-detects': [
'touchevents'
]
}, function(file) {
fs.writeFile('some/path/to/modernizr.js', file, function() {
return callback();
});
});
});
@bshack
Copy link
Author

bshack commented Mar 13, 2016

if you don't like the 'gulp-modernizr' module you can just do this..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment