Build: space between curly and paren is optional

Fixes gh-2399
Close gh-2400
This commit is contained in:
Timmy Willison 2015-06-16 11:24:21 -04:00
parent 842958e7ae
commit 63a577aa0b

View File

@ -11,7 +11,7 @@ module.exports = function( grunt ) {
var fs = require( "fs" ),
requirejs = require( "requirejs" ),
srcFolder = __dirname + "/../../src/",
rdefineEnd = /\}\);[^}\w]*$/,
rdefineEnd = /\}\s*?\);[^}\w]*$/,
config = {
baseUrl: "src",
name: "jquery",
@ -62,7 +62,7 @@ module.exports = function( grunt ) {
} else {
contents = contents
.replace( /\s*return\s+[^\}]+(\}\);[^\w\}]*)$/, "$1" )
.replace( /\s*return\s+[^\}]+(\}\s*?\);[^\w\}]*)$/, "$1" )
// Multiple exports
.replace( /\s*exports\.\w+\s*=\s*\w+;/g, "" );