Skip to content

Instantly share code, notes, and snippets.

@nmec
Last active January 31, 2019 17:15
Show Gist options
  • Select an option

  • Save nmec/b16abe555988061e3786 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

Thanks ! It's working like a charm !

@jonnywyatt

Copy link
Copy Markdown

๐Ÿ‘

@comeontom

Copy link
Copy Markdown

Good

@Thieum

Thieum commented Oct 25, 2017

Copy link
Copy Markdown

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

@dixhuit

dixhuit commented Mar 12, 2018

Copy link
Copy Markdown

Thanks for this!

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