aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-08-16 12:54:43 -0400
committerTimmy Willison <timmywillisn@gmail.com>2013-08-16 12:56:33 -0400
commit2f985ff826cf55f1fc1fe174716098f758fa5c4d (patch)
treec61a3f7ff764a10e9d1c4ab40a6ed8a9166e2be4 /build
parent993418e9e9ae9bec733cfb822de3492fb4b730ec (diff)
downloadjquery-2f985ff826cf55f1fc1fe174716098f758fa5c4d.tar.gz
jquery-2f985ff826cf55f1fc1fe174716098f758fa5c4d.zip
When converting the source to AMD, don't forget to AMD
Diffstat (limited to 'build')
-rw-r--r--build/tasks/build.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js
index 753ca60dc..adbc30923 100644
--- a/build/tasks/build.js
+++ b/build/tasks/build.js
@@ -57,10 +57,13 @@ module.exports = function( grunt ) {
}
// Remove define wrappers, closure ends, and empty declarations
+ // Unless it's the proper AMD define
contents = contents
.replace( /define\([^{]*?{/, "" )
- .replace( rdefineEnd, "" )
- // Remove empty definitions
+ .replace( rdefineEnd, "" );
+
+ // Remove empty definitions
+ contents = contents
.replace( /define\(\[[^\]]+\]\)[\W\n]+$/, "" );
}
return contents;