Skip to content

Instantly share code, notes, and snippets.

@nmec
Last active January 31, 2019 17:15
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmec/b16abe555988061e3786 to your computer and use it in GitHub Desktop.
Save nmec/b16abe555988061e3786 to your computer and use it in GitHub Desktop.
A very simple gulp task for compiling a custom modernizr build.
'use strict';
var fs = require('fs');
var gulp = require( 'gulp' );
var modernizr = require('modernizr');
var config = require('./modernizr-config'); // path to JSON config
gulp.task( 'modernizr', function (done) {
modernizr.build(config, function(code) {
fs.writeFile('./dist/modernizr-build.js', code, done);
});
});
@Joffrey-Parisot
Copy link

Thanks ! It's working like a charm !

@jonnywyatt
Copy link

👍

@comeontom
Copy link

Good

@Thieum
Copy link

Thieum commented Oct 25, 2017

👍
use var config = require('modernizr/lib/config-all.json'); // path to JSON config for all options in dev.

@dixhuit
Copy link

dixhuit commented Mar 12, 2018

Thanks for this!

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