Skip to content

Commit

Permalink
Fixed define() stripping regex... we've got both `define("modernizr…
Browse files Browse the repository at this point in the history
…-init", ...)` and `define("modernizr-build", ...)` being left over for some reason.
  • Loading branch information
stucox committed Jun 13, 2013
1 parent fcad676 commit 6e35920
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ module.exports = function( grunt ) {
// Strip define fn
grunt.registerMultiTask('stripdefine', "Strip define call from dist file", function() {
this.filesSrc.forEach(function(filepath) {
var mod = grunt.file.read(filepath).replace('define("modernizr-init", function(){});', '');
// Remove `define("modernizr-init" ...)` and `define("modernizr-build" ...)`
var mod = grunt.file.read(filepath).replace(/define\("modernizr-(init|build)", function\(\)\{\}\);/g, '');

// Hack the prefix into place. Anything is way to big for something so small.
if ( modConfig && modConfig.classPrefix ) {
Expand Down

0 comments on commit 6e35920

Please sign in to comment.