Created
March 13, 2016 01:00
-
-
Save bshack/5ed1e118f54df54efa4f to your computer and use it in GitHub Desktop.
using gulp with modernizr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ## 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(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if you don't like the 'gulp-modernizr' module you can just do this..