mirror of
https://github.com/Modernizr/Modernizr.git
synced 2026-05-02 03:03:05 -04:00
Corrected stripdefine grunt task to account for variable r.js output (some versions include an empty dependency array in a final define(), others don't)
This commit is contained in:
2
grunt.js
2
grunt.js
@@ -172,7 +172,7 @@ module.exports = function( grunt ) {
|
||||
|
||||
// Strip define fn
|
||||
grunt.registerMultiTask('stripdefine', "Strip define call from dist file", function() {
|
||||
var mod = grunt.file.read( this.file.src[0] ).replace('define("modernizr-init",[], function(){});', '');
|
||||
var mod = grunt.file.read( this.file.src[0] ).replace(/define\("modernizr-init",( \[\],)? function\(\){}\);/, '');
|
||||
|
||||
// Hack the prefix into place. Anything is way to big for something so small.
|
||||
if ( modConfig && modConfig.classPrefix ) {
|
||||
|
||||
Reference in New Issue
Block a user