Build: space between curly and paren is optional

Ref 63a577aa0b
Fixes gh-2399
Close gh-2400
This commit is contained in:
Timmy Willison 2015-06-16 11:24:21 -04:00 committed by Oleg Gaidarenko
parent 85aed35cb5
commit cbb0be6c41

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",
@ -68,7 +68,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, "" );